A federal appeals court has ruled that a floating barrier in the Rio Grande meant to curb the flow of illegal migrants from Mexico into Texas can remain in place for now.

The Fifth Circuit Court of Appeals overturned a previous decision by a panel of the court who said the buoys must be moved in December, saying the court had abused its discretion in granting a preliminary injunction.

Texas Gov. Greg Abbott responded to the ruling on social media, calling the court’s decision "justice."

"Biden tried to remove them. I fought to keep them in the water," the Republican wrote. "That is exactly where they will stay."

BIDEN BORDER PLAN OFFERS NEITHER ‘INVESTMENT’ NOR ‘SOLUTIONS’: IMMIGRATION WATCHDOG

The buoy barrier was installed near the border town of Eagle Pass, Texas, with anchors in the riverbed.

barrier with floating buoys

Gov. Greg Abbott installed a barrier with floating buoys to prevent the crossing of migrants. (David Peinado Romero/Anadolu Agency via Getty Images, File)

The buoys brought legal challenges from the Biden administration, which accused Texas of putting a barrier on the international boundary without permission in violation of the Rivers and Harbors Act. The Biden administration also said the water barrier raised humanitarian and environmental concerns.

floating barrier is deployed in the middle of the Rio Grande

The floating barrier is deployed in the middle of the Rio Grande near the border town of Eagle Pass, Texas, with anchors in the riverbed. (Chandan Khanna/AFP via Getty Images, File)

GOV. GREG ABBOTT SAYS BIDEN EXECUTIVE ORDER MAKING ILLEGAL BORDER CROSSINGS ‘WORSE’: ‘GASLIGHTING’ AMERICANS

The Biden administration also is fighting for the right to cut razor-wire fencing at the border and for access to a city park at the border that the state fenced off.

Biden sitting at a desk

The Biden administration has disputed the floating barrier in the Rio Grande. (Anna Moneymaker/Getty Images, File)

CLICK TO GET THE FOX NEWS APP

The broader lawsuit in district court is set for a trial beginning on Aug. 6.

Fox News’ Michael Dorgan and The Associated Press contributed to this report.