A bloody weekend clash between Mexican security forces and drug-cartel gunmen left 21 dead and a shell-shocked city looking like a war zone.

The violence began at noon Saturday when a convoy of cartel trucks stormed into the city of Villa Union in the state of Coahuila, an hour south of the Texas border, and opened fire on the municipal building, which houses the mayor’s office.

The move prompted an hourlong gunfight between the cartel and security forces — with photos of the aftermath showing the town hall (above) and a pickup truck with Texas plates riddled with bullet holes. On the driver’s side door are the letters CDN — from the Spanish for Cartel of the Northeast.

Four officers and 10 gunmen were killed in the initial exchange of gunfire, with the other seven cartel members gunned down Sunday by Mexican officers who pursued the convoy after its members fled the city, officials said.

Miguel Ángel Riquelme Solís, the governor of Coahuila, told reporters Sunday that the government reacted “decisively” to the attack. He toured the scene, looking at police vehicles left riddled with bullet holes in the assault.

State officials said forces were deployed “by land and air, so as not to let the cowardly attack go unpunished,” according to a statement released by Coahuila Sunday.

But the attack dealt another blow to Mexican President Andres Manuel Lopez Obrador, who has failed to curtail the cartels, despite promising to do so when he took office a year ago.

Mexican security forces were left red-faced on Oct. 17 when they captured the son of jailed drug lord Joaquin “El Chapo” Guzman — only to be forced to release him hours later when cartel thugs turned the town of Culiacan into a war zone.

Lopez Obrador has felt added pressure from the United States following the Nov. 4 massacre of three women and six children with dual American and Mexican citizenship who were living in a breakaway Mormon community in the state of Sonora.

US Attorney General William Barr is scheduled to visit Mexico next week to discuss security issues.

Tensions between the US and Mexico intensified last week when President Trump announced that he plans to designate Mexican cartels as terror groups and “start hitting them with drones.”

Lopez Obrador said Friday he would not accept any foreign intervention to deal with the gangs.

Mexican forces vowed to remain in Villa Union for several days to restore calm to the rattled city — and to keep the cartel from storming the city again.

“These groups won’t be allowed to enter state territory,” officials in Coahuila said.

Wire Services