A judge has ruled against a segment of Donald Trump's controversial travel ban, after it had banned grandparents and other close relatives of people living in the US from entering the country.

District Judge Derrick Watson in Hawaii said that the the interpretation of the ban had been viewed too narrowly after the Supreme Court allowed a partial reinstatement of one of Trump's flagship policies.

The ban only allows those who have "bona fide" family ties to enter the US. That, according to the Trump administration, did not include grandparents, grandchildren, brothers-in-law, sisters-in-law, uncles, aunts, nephews, nieces and cousins.

But Judge Watson disagreed, saying: "Common sense, for instance, dictates that close family members be defined to include grandparents. Indeed, grandparents are the epitome of close family members."

People from Libya, Syria, Iran, Somalia, Yemen and Sudan will be banned for 90 days. Refugees from any nation will be banned for 120 days.

The first travel ban was introduced in January leading to chaos at major airports across the US. Courts around the country soon started blocking it, bringing the landmark policy to a halt.

Trump then issued a new watered-down version which was still turned down by courts with one Virginia court claiming it was "rooted in religious animus" toward Muslims.

When the nation's top court allowed the temporary reinstatement of the ban, Trump said: "Today's unanimous Supreme Court decision is a clear victory for our national security. Today's ruling allows me to use an important tool for protecting our nation's homeland. I am also particularly gratified that the Supreme Court's decision was 9-0."

The Supreme Court also agreed to hear the government's appeal against the lower courts which blocked the original and watered-down bans. The first arguments will be heard in the autumn.