U.S. Customs and Immigration officers keep watch at the arrivals level at Los Angeles International Airport in Los Angeles, California, U.S., June 29, 2017. REUTERS/Mike Blake/Files

By Dan Levine and Mica Rosenberg

(Reuters) - President Donald Trump's temporary ban on travelers from six Muslim-majority countries cannot stop grandparents and other relatives of United States citizens from entering the country, a U.S. judge said on Thursday.

The ruling by U.S. District Judge Derrick Watson in Honolulu also opens the door for more refugees and deals Trump a fresh courtroom defeat in a long back-and-forth over an executive order that has gone all the way up to the U.S. Supreme Court.

The state of Hawaii had asked Watson to narrowly interpret a Supreme Court ruling that revived parts of Trump's March 6 executive order banning travelers from Iran, Libya, Somalia, Sudan, Syria and Yemen for 90 days, as well as refugees for 120 days.

The Supreme Court last month said the ban could take effect, but that anyone from the six countries with a "bona fide relationship" to a U.S. person or entity could not be barred.

The Trump administration then interpreted that opinion to allow spouses, parents, children, fiancés and siblings into the country, but barred grandparents and other family members, in a measure Trump called necessary to prevent attacks.

Watson harshly criticized the government's definition of close family relations as "the antithesis of common sense" in a ruling that changes the way the ban can now be implemented.

"Common sense, for instance, dictates that close family members be defined to include grandparents. Indeed, grandparents are the epitome of close family members," he wrote.

A Justice Department spokeswoman declined to comment.

Trump's order is a pretext for illegal discrimination, Hawaii Attorney General Douglas Chin said in a statement.

"Family members have been separated and real people have suffered enough," Chin said.

Chin had asked Watson for an injunction allowing grandparents and other family members to travel to the United States. Hawaii and refugee groups also had argued that resettlement agencies have a "bona fide" relationship with the refugees they help, sometimes over the course of years.

The Justice Department said its rules were properly grounded in immigration law.

Watson said the assurance by a resettlement agency to provide basic services to a newly arrived refugee constitutes an adequate connection to the U.S. because it is a sufficiently formal and documented agreement that triggers responsibilities and compensation.

"'Bona fide' does not get any more 'bona fide' than that," Watson said.

Melanie Nezer, vice president of global refugee advocacy group HIAS, said the ruling should mean that refugees can continue to be resettled in the United States, beyond a cap of 50,000 set by the executive order. That limit was reached this week.

"We are thrilled that thousands of people will be reunited with their family members," said Becca Heller, director of the International Refugee Assistance Project.

More than 24,000 additional refugees should be allowed to travel to the U.S. under Watson's order, she estimated.

Watson did not grant everything the state of Hawaii sought, however. He rejected a request to categorically exempt all Iraqis refugee applicants who believe they are at risk due to their work for the U.S. government since March, 2003, as interpreters and translators, for instance.

Watson also refused a blanket exemption for those eligible to apply to a refugee program aimed at protecting certain children at risk in El Salvador, Honduras, and Guatemala.

The roll-out of the narrowed version of the ban was more subdued than in January, when Trump first signed a more expansive version of his order. That sparked protests and chaos at airports around the country and the world.

(Reporting by Dan Levine in San Francisco and Mica Rosenberg in New York; Additional reporting by Andrew Chung in New York; Editing by Clarence Fernandez)