WASHINGTON -- The Supreme Court's decision to partially reinstate U.S. President Donald Trump's temporary travel ban has left the effort to keep some foreigners out of the United States in a murky middle ground, with unanswered questions and possibly more litigation ahead.

The justices ruled Monday in an unsigned opinion they would hold a full hearing on the case in October. In the meantime, the administration can bar travellers from six majority-Muslim countries from the U.S. if they don't have a "credible claim of a bona fide relationship" with someone or some entity in the country.

It's unclear what will ultimately constitute a "bona fide relationship," though the ruling suggested that an American job, school enrolment or a close relative could meet that threshold. Equally unclear is how many foreigners will be affected from the six countries: Syria, Sudan, Iran, Yemen, Libya and Somalia.

The ruling was seen as at least a partial victory for Trump in the biggest court case of his presidency. Trump claims the temporary ban is needed to prevent terrorist attacks. Opponents reject that and argue it's a backdoor way to bar Muslims from entering the United States, as Trump promised in his campaign.

The early indications are that the administration will use the decision to take a tough line on travellers from those countries. A senior U.S. official familiar with the situation said the Trump administration has plans in place to relaunch the stalled ban and tourists will be among those kept out.

Under these plans, largely orchestrated by White House adviser Stephen Miller, tourists from those countries and any academics, lecturers or others invited to speak or make presentations in the U.S. will be barred. Those groups are regarded as unable to show a substantial and pre-existing tie to a person or institution in the United States. The official who described the plans was not authorized to discuss them publicly by name and spoke on condition of anonymity.

But barring a lecturer already set to speak could cause legal trouble for the government. The Supreme Court opinion specifically said people who accepted a job offer with an American company or "a lecturer invited to address an American audience" could prove a "bona fide relationship."

But some immigration lawyers and advocates said relatively few people would fall under the ban because these travellers tend to have sufficient relationships with people or institutions in the United States.

Jamal Abdi, policy director for the National Iranian American Council, said most Iranians who visit the United States have relatives here or are coming to work or study. He said his group has no idea how the administration plans to judge family relationships and a hard line could mean a significant number of Iranians will be kept out the country for the time being.

It could also mean more lawsuits if advocates for immigrants believe the administration is going beyond the Supreme Court's guidelines in barring visitors to the United States.

Like the fate of would-be tourists and scholars, the immediate future for refugees is murky.

In its opinion, the court partially reinstated Trump's temporary prohibition on refugees from any country, using criteria similar to that used in the travel ban. The effect on refugees could be greater because they are less likely to have family, school or business relationships in the United States.

Lavinia Limon, CEO of the U.S. Committee for Refugees and Immigrants, said she was dismayed by the ruling, but insisted that her agency has "an existing relationship with incoming refugees, certified and arranged through the Department of State."

"Travel plans are in process, beds have been made and staff around the country plan to meet new Americans at the airports today, tomorrow and in the coming weeks and months," Limon said.

Trump's initial travel ban caused panic and chaos at airports around the world in late January as it took effect immediately after being signed. Refugees, legal U.S. residents and visa holders were turned back at airports or barred from boarding U.S.-bound planes. A federal court blocked it about a week later.

There may be less confusion as the ban is partially reinstated. The administration has revised its travel ban to exclude legal residents and visa holders. Also, the government said last week the ban would go into effect 72 hours after the Supreme Court ruling -- which would be Thursday morning in Washington.

Associated Press reporters Ted Bridis and Mark Sherman contributed to this report