The 9th U.S. Circuit Court of Appeals on Thursday upheld a previous ruling by a Seattle judge that blocked key parts of President Donald Trump’s travel ban on seven predominantly Muslim countries.

The court refused to block the lower court's ruling that suspended the ban, and allowed travelers who had been barred from entering the U.S. to return, the Associated Press reported.

Federal court judge James L. Robart of Seattle made the initial decision to suspend Trump’s executive order over the weekend, reinstating entry for visitors with valid visas from Syria, Iraq, Iran, Sudan, Libya, Yemen, and Somalia. Robart ruled in favor of the states of Washington and Minnesota who brought the case, arguing that the ban was unlawful, as well as a threat to both national security and the economy, the New York Times reported.

The appeals court ruling Thursday means that travelers from those seven countries will continue to be allowed into the U.S. with valid visas.

Following the announcement of the original ruling over the weekend, the Justice Department argued that the president was within his rights to suspend immigration from certain countries based on national security threats.

The department said in a brief that the order was issued to “permit an orderly review and revision of screening procedures to ensure that adequate standards are in place to protect against terrorist attacks,’’ the Boston Globe reported.

Fifteen states and the District of Columbia filed a supporting brief siding with Washington and Minnesota, arguing that the ban must not be reinstated.

“If this court were to grant a stay,” the supporting brief said, “it would resurrect the chaos experienced in our airports beginning on the weekend of Jan. 28 and 29, and cause harm to the states—including to state institutions such as public universities, to the businesses that sustain our economies, and to our residents.”