A US judge has rejected the state of Hawaii's bid to exempt grandparents from President Donald Trump's Muslim ban, but he said the state could directly ask the US Supreme Court to clarify its ruling.

US District Judge Derrick Watson in Honolulu had been asked to interpret a ruling from the Supreme Court that revived parts of Trump's March 6 executive order banning people from six Muslim-majority countries for 90 days.

The highest court let the ban go forward with a limited scope, saying it could not apply to anyone with a credible "bona fide relationship" with a US person or entity.

Trump said the measure was necessary to prevent extremist attacks. However, opponents including states and refugee advocacy groups sued to stop it, disputing its security rationale and saying it discriminated against Muslims.

READ MORE: Muslim Ban - US sets strict rules for visa applicants

Watson said in Thursday's ruling he "declines to usurp the prerogative of the Supreme Court to interpret its own order".

Hawaii said late on Thursday it would appeal against Watson's ruling to the 9th US Circuit Court of Appeals in San Francisco, according to a court filing.

The Justice Department said in a statement it was pleased with the ruling.

"We are confident that the US Supreme Court will again vindicate the president and his constitutional duty to protect the national security of the United States," it said.

'Bona fide relationship'

The government said after last month's Supreme Court ruling that a "bona fide relationship" meant close family members only, such as parents, spouses, fiancés, siblings and children.

Grandparents, grandchildren, aunts, uncles, nieces, nephews and cousins from Iran, Libya, Somalia, Sudan, Syria and Yemen would still be banned.

The state of Hawaii asked Watson last week to clarify the Supreme Court's ruling, arguing the government's definition of "bona fide relationship" was too narrow.

OPINION: The Muslim ban - Did Trump really win?

Justice Department lawyers said its definition "hews closely" to language found in US immigration law, while Hawaii's attorney general's office said other parts of immigration law included grandparents as close family.

The government reversed its position on fiancés before the ban went into effect last week, saying they could also qualify for exceptions.

The rollout of the narrowed version of the ban was more subdued last week than in January, when Trump first signed a more expansive version of the order.

That sparked protests and chaos at airports around the country and the world.

Source: News agencies