Donald Trump attempted to implement his controversial travel ban for a third time, but to no avail.

The US Court of Appeals for the 9th Circuit determined that the third version of Trump’s proposed travel ban on people from primarily Muslim countries violates federal law. The court issued a lengthy document declaring that "the Proclamation’s indefinite entry suspensions constitute nationality discrimination in the issuance of immigrant visas, BuzzFeed reports. The countries being targeted with the ban are: Chad, Iran, Libya, North Korea, Syria, Venezuela, and Yemen.

The decision partially reads: 

"Further, the President did not satisfy the critical prerequisite Congress attached to his suspension authority: Before blocking entry, he must first make a legally sufficient finding that the entry of the specified individuals would be "detrimental to the interests of the United States." The Proclamation once again conflicts with the INA’s prohibition on nationality-based discrimination in the issuance of immigrant visas."

Trump issued his first travel ban targeting several Muslim-majority countries in January, which caused travelers to be detained at airports and mass protests. This most recent version of the ban was introduced in September.