The gang torched several vehicles, including a school bus, and used trucks and cars to block streets in Reynosa, sowing panic in the city of 610,000 people across from McAllen, Texas.
Terrified Reynosa residents posted pictures on Twitter of burning vehicles and people taking cover on the ground, while the US consulate urged Americans to stay indoors.
The firefights began after a leader of the Gulf cartel was arrested in the city, two federal officials said on condition of anonymity, identifying the suspect as Jose Tiburcio Hernandez Fuentes, also known as "El Gafe" (The Jinxed One).
The Gulf gang's violent reaction echoed similar operations launched by another criminal group, the Jalisco New Generation Drug Cartel, against security forces.
The New Generation launched two ambushes on federal and state police in the western state of Jalisco that left a total of 20 officers dead in recent weeks in apparent revenge over the takedown of gang members.
A Tamaulipas security task force issued a statement saying that army troops and federal police had detained an unspecified number of gang members.