Mexico’s government has pledged to take control of a violent western state after days of fighting between masked vigilantes and members of one of the country’s most powerful drug cartels.

Since late last year, vigilante groups in the state of Michoacan have moved deeper into territory controlled by the Knights Templar cartel and they now are converging on Apatzingan, considered one of gang’s main strongholds.

The vigilantes’ advance has raised the risk of a bloody urban battle in Apatzingan. Interior minister Miguel Angel Osorio Chong on Monday urged the vigilante groups to withdraw from the battleground so federal forces could take control.

“Be certain that we will contain the violence in Michoacan,” Osorio Chong said at an event in the state capital of Morelia.

President Enrique Pena Nieto, who has just ended his first year in office, has sought to shift the public focus away from grinding violence and onto a series of economic reforms he has pushed through a divided Congress.

But a steady stream of killings that plagued his predecessor’s term continues, and the deepening crisis in Michoacan is beginning to cast doubt on his ability to maintain order. Drug trafficking gangs have been waging battles over trafficking routes for the last decade.

Analysts warned that any siege on Apatzingan by the vigilante groups could spark a much larger and more unpredictable urban conflict. They also said the government may have waited too long to try to contain the growing vigilante movement.

“This is a war. This is no longer an issue of public safety, or normal law enforcement. This is a political-military conflict between a number of armed groups,” said security analyst Alejandro Hope of the Mexican Competitiveness Institute think tank. “This could get out of control any time now.”

Masked vigilantes took power in more than a dozen rural communities in 2013 across Michoacan, claiming authorities were failing to stop rising extortion, kidnapping and violence.

The government appeared to tolerate the so-called self-defense groups, apparently in the hope they could oust the Knights Templar and help restore order.

In the latest push by vigilantes, hundreds of men, many armed with high-powered rifles instead of the rusty shotguns toted by such groups elsewhere in the country, barreled into the town of Nueva Italia on Sunday in a convoy of pickup trucks, saying they wanted to liberate it from the Knights Templar cartel.

The vigilantes entering Nuevo Italia, located 35 kilometres from Apatzingan, were greeted by sporadic gunfire. At least one vigilante was wounded, according to a Reuters witness.

The group, mostly young men with faces covered by improvised masks made from t-shirts or bandannas, quickly moved into the town center and detained local police, who the vigilantes have said are working with drug traffickers.

Both the state government and federal troops have stood aside as the vigilantes took over more and more communities.

Over the weekend, federal troops moved in greater numbers into Apatzingan, where there is a military base. Local residents fear an incursion by vigilantes into Apatzingan could lead to heavy fighting.

Former President Felipe Calderon launched his military-led offensive against the drug gangs in Michoacan shortly after he took office in late 2006. But despite years of battles between federal troops and drug gangs that left around 70,000 people dead, security only deteriorated in Michoacan.

Michoacan’s murder rate has nearly doubled since 2006 as traffickers increasingly turned from marijuana plantations to producing methamphetamine in crude labs hidden in the state’s mountains and avocado groves.

Late last year, dozens of mutilated corpses were found buried in mass graves in an area on the border between the states of Michoacan and Jalisco. Five decapitated bodies were dumped in the state capital in late December.

Reuters