Gun battles have left at least three people dead on the streets of Reynosa, a Mexican city on the border with the US that has been plagued by drug cartel violence.
Fighting broke out after the arrest of a leader of one of the main gangs in the area.
“The same criminal group reacted by attacking federal forces,” officials said in a statement.
The statement described the dead men as “armed civilians”.
Officials said parts of the city had been blocked with vehicles set on fire by gunmen. Authorities issued an urgent notice warning residents not to use various main roads because of shooting and blockades.
The situation was brought under control by late afternoon on Friday.
Authorities captured a leader of the Gulf Cartel, known as El Gafe, earlier in the day, apparently triggering the violence.
The Gulf Cartel has been dominant in Reynosa and the state of Tamaulipas for years, but has been weakened recently by the arrest of several leaders including Mario Armando Ramirez Trevino, known as X-20, in August 2013.
That has led to infighting between different factions in the cartel.
Reynosa and other cities in the state have also been affected by violent conflict between the Gulf Cartel and their bitter rivals, Los Zetas.
Both gangs have been fighting for control of the region, regarded as a strategic commercial entry point into the US.
Reynosa sits across from the Texan city of McAllen. Together they form a metropolitan area of about two million residents.