(CNN) The 9th US Circuit Court of Appeals narrowed the scope of President Donald Trump's travel ban Thursday, ruling that extended family members such as grandparents are exempt from the ban, as well as a certain class of refugees, while the legality of the ban is under review.

The ruling from a three-judge panel changes the status quo, as it allows a group of refugees with contractual commitments from resettlement organizations to come into the country. The ruling will take effect in five days, the appeals court specified.

The case stems from a Supreme Court order back in June. In that order, the justices allowed the travel ban to go into effect pending appeal -- which will be heard October 10 -- except as it applies to those individuals with a "bona fide" relationship with the United States.

The travel ban bars people from Iran, Libya, Somalia, Sudan, Syria and Yemen from entering the US.

Almost as soon as the order was issued, parties from both sides scurried back to court seeking clarification of the exact meaning of a "bona fide" relationship.

Read More