Mexican troops made an "involuntary" incursion into U.S. territory while on patrol along the border, Mexico's military said.

The situation "was explained to (U.S.) immigration authorities" and the 33 soldiers returned to Mexican territory to resume their mission, defense officials said in a statement.

Traveling in four military vehicles, the troops crossed the new Donna-Rio Bravo International Bridge over the Rio Grande, about 15 miles southeast of McAllen, Texas.

U.S. authorities have erected barriers along more than a third of the country's 3,200-kilometer (1,988-mile) border with Mexico in a bid to curb unauthorized immigration.

A spokesperson for U.S. Immigration and Customs Enforcement, Nina Pruneda, told Efe that personnel from ICE and Customs and Border Protection interviewed the 33 Mexican soldiers and then allowed them to return to Mexico.