Attorney General Merrick Garland threatened Texas with legal action Thursday, following an executive order by Gov. Greg Abbott that barred ground transportation of migrants who could be carrying COVID-19

Abbott's order came amid reports of federal authorities dropping COVID-positive migrants into Texas border towns

Garland told Abbott to "immediately rescind" the executive order he called "both dangerous and unlawful."

GOV. ABBOTT DENIES REQUESTS FROM MAYOR AND JUDGE TO ENFORCE MASKS IN SCHOOLS, GOVERNMENT BUILDINGS

"The Order violates federal law in numerous respects, and Texas cannot lawfully enforce the Executive Order against any federal official or private parties working with the United States," Garland wrote in a letter to Abbott.

The executive order issued Wednesday by Abbott restricted ground transportation of migrants "who pose a risk of carrying COVID-19 into Texas communities."

Abbott directed the Texas Department of Public Safety to stop any vehicle reasonably suspected of violating his order.

"The dramatic rise in unlawful border crossings has also led to a dramatic rise in COVID-19 cases among unlawful migrants who have made their way into our state, and we must do more to protect Texans from this virus and reduce the burden on our communities," Abbott said in his Wednesday order. "This Executive Order will reduce the risk of COVID-19 exposure in our communities."

Abbott argued his order was necessary to counter the rise in illegal immigration under the Biden administration.

GOV. ABBOTT SAYS TEXAS WILL BUILD BORDER WALL AMID IMMIGRATION CRISIS

But Garland said the order not only interfered with federal laws but "would jeopardize the health and safety of noncitizens in federal government custody."

The attorney general warned Abbott that if he does not rescind the executive order, Garland "intends to pursue all appropriate legal remedies" to ensure Texas does not interfere with federal regulations. 

The Texas governor has butted heads with the Biden administration over the issue of immigration since the president took office in January. 

Abbott has repeatedly called on the president to more urgently address the immigration crisis at the southern border to stem the record-setting number of illegal migrant crossings.

CLICK HERE TO GET THE FOX NEWS APP

U.S. Customs and Border Protection have reported over 900,000 illegal migrant encounters since January.

The governor last month said he intends to build a border wall without the support of the federal government.

Fox News could not immediately reach Abbott for comment.