An appeals court in the United States on Thursday rejected an attempt by the Donald Trump administration to include grandparents and other relatives of legal US citizens in a travel ban from six Muslim-majority countries, Reuters reported.

“It is hard to see how a grandparent, grandchild, aunt, uncle, niece, nephew, sibling-in-law, or cousin can be considered to have no bona fide relationship with their relative in the United States,” the three-judge panel of the Ninth US Circuit Court of Appeals said.

The court also ruled that those who have relationships with resettlement agencies in the country should also be exempted from the executive order. The advance preparations made and the expenditure of resources incurred by these resettlement bodies prove that a “bona fide relationship with the refugee exists”, the bench held.

The state of Hawaii had contended that the criteria to ban close relatives from entering the country was too restrictive, Bloomberg reported.

In July, the US Supreme Court had ruled that Trump’s travel ban can be implemented on a limited basis only by exempting bona fide relationships from it. The top court will hear arguments against Trump’s travel ban on October 10.

The travel order, which came into effect on June 30, bars visitors from Iran, Libya, Sudan, Syria and Yemen from entering the country. The US State Department had said it will only allow “close family” of those in the US from these countries.

Trump has insisted the ban is to protect the US from terrorism and to allow immigration officials to vet those entering the country more closely. But the move has been seen as part of one of Trump’s key presidential campaign promises – a “total and complete shutdown of Muslims” entering the US.