WASHINGTON — Senior officials from the departments of State, Justice and Homeland Security labored Wednesday to finalize rules for visitors from six mostly Muslim nations who hope to avoid the Trump administration’s revived travel ban and come to the United States.

The deliberations came as U.S. embassies and consulates awaited instructions on how to implement this week’s Supreme Court order that partially reinstated the ban after it was blocked by lower courts. The administration has given itself a Thursday deadline for implementing the scaled-back ban, which applies to visitors from Syria, Sudan, Somalia, Libya, Iran and Yemen.

The justices’ opinion exempts applicants from the ban if they can prove a “bona fide relationship” with a U.S. person or entity. Government lawyers must determine how to define such a relationship. The court offered only broad guidelines – suggesting they would include a relative, job offer or invitation to lecture in the U.S.

Shortly after the court’s ruling, the State Department advised all U.S. diplomatic posts to await instruction