Judge Derrick Watson in Hawaii has ruled that grandparents and some other relatives of people in the United States should be exempt from the clampdown, saying the original terms of the ban defied common sense.

His decision was hailed as a victory by opponents of the ban, who say it singles out Muslims in violation of the US constitution.

The Trump administration insists the restrictions are necessary to keep out terrorists.

The US Supreme Court had allowed part of the ban to go into effect on June 29, putting an end, at least temporarily, to five months of politically charged skirmishes in the lower courts.

Specifically, the court allowed a 90-day ban on visitors from Iran, Libya, Somalia, Sudan, Syria and Yemen, and a 120-day ban on refugees, with exceptions for people with "close family relationships" in the United States.

The Trump administration defined that to be parents, spouses, children, sons- and daughters-in-law, siblings and step- and half-siblings.

But Watson found that "the Government's narrowly defined list finds no support in the careful language of the Supreme Court or even in the immigration statutes on which the Government relies.