A federal judge on Tuesday dealt an important blow to Texas Governor Greg Abbott’s flawed plan to stop migrants from entering and traveling through Texas.

Governor Abbott issued an executive order on July 28 that prohibited anyone other than law enforcement officials from transporting people who had been detained by U.S. Customs and Border Protection (CBP). The order also authorized Texas Department of Public Safety officers to stop anyone they believed was violating this order and impound their vehicle.

The U.S. Department of Justice (DOJ) swiftly sued the State of Texas to stop the order from taking effect. U.S. District Judge Kathleen Cardone’s decision granting a temporary restraining order (TRO) states that the DOJ is likely to win the lawsuit that seeks to revoke Gov. Abbott’s executive order because it conflicts with federal law and violates the U.S. Constitution by regulating the operations of the federal government. The TRO, which stops Texas from implementing the order while the lawsuit continues, will be in effect at least until August 13. The parties will then go back to court for a more extensive presentation of the facts. But this decision does not bode well for Gov. Abbott.

In its complaint, the DOJ explains exactly how Gov. Abbott’s order conflicts with the federal government’s operations at the U.S.-Mexico border.

Congress has given the federal government—not the states—the power to oversee the administration of federal immigration laws. This power includes the authority to arrest, detain, remove—and when needed—transport noncitizens.

When it exercises this authority, the federal government contracts with transportation providers or relies on individuals who are not law enforcement officials to transport people in its custody. For example, the federal government coordinates transportation for unaccompanied minors who have been detained at the border by CBP and are travelling to meet with loved ones or those who must be transferred to facilities operated by the Office of Refugee Resettlement.

The federal government also is authorized to release certain noncitizens from detention, and when it does so, they must be transported to places where they will stay as they face immigration proceedings. Federal law already has sanctions for those who unlawfully transport noncitizens.

Attorney General Merrick Garland, in a letter to Gov. Abbott prior to DOJ filing its lawsuit, warned that Texas has no basis to interfere with the federal government’s authority over immigration matters. But Gov. Abbott kept his executive order in place.

This order is problematic for several other reasons.

Gov. Abbott is wrongly  blaming migrants seeking refuge in the United States for the uptick in COVID-19 cases.

Yet, the governor’s justification for the order is inconsistent with other Texas policies. The text of the order says that the movement of migrants in Texas is “exposing Texans to COVID-19 and creating a public health disaster.” But Gov. Abbott’s solution to the COVID-19 pandemic in Texas has been to prohibit government entities from mandating masks and fine any local entities that dare to defy his orders, while merely encouraging “good hygiene, social distancing and other mitigation practices.”

Importantly, enforcing this executive order likely will require officers in Texas to engage in racial profiling. The order allows officers to stop vehicles transporting a group of migrants who “have been detained by CBP for crossing the border illegally.”

An officer is supposed to have reasonable suspicion that the occupants of the vehicle are violating this section of the order, but what factors does an officer need to articulate to determine whether this reasonable suspicion exists? While the order doesn’t specify, it is not far-fetched to suspect that officers would stop drivers based on their passengers’ race or ethnicity.

Immigrants who have already been processed by CBP must be able to travel throughout the United States to rejoin loved ones and seek ultimate immigration relief. This is not the first time Gov. Abbott has tried to encumber their path.  Courts throughout the country recognize that the federal government has the authority on immigration matters. Gov. Abbott needs to get on board.