Heavily-armed men assaulted Mexican federal police units in a carefully planned attack in which 22 people were killed, most of them assailants, in six towns, the government announced on Tuesday.

The gunmen concealed themselves in hills above checkpoints in Michoacan state, a western area tormented by drug cartels, and blocked at least four sections of highway before swooping on their targets, wielding grenades.

"So far, we have two federal police killed, 20 presumed criminals shot dead and another 15 people under arrest," the Interior Ministry's National Security Council said in a statement.

The attackers were equipped with high-powered rifles and grenades when they struck in the troubled Tierra Caliente region, a hot spot for gang violence, the council added, without stating how many police or gunmen had been wounded.

In May, Mexico's government promised to keep thousands of troops in Michoacan, which has 4.3 million citizens, until peace is restored.

Interior Minister Miguel Angel Osorio Chong at the time held a meeting of the national security team in the state capital Morelia with local officials, aimed at tackling a crime wave that led some towns to start vigilante groups.

Officials said 4,000 soldiers and marines and 1,000 federal police were deployed.

Osorio Chong also said the forces would leave once security conditions have improved and the state government can hold its own.

Michoacan was the first state to see troops when former president Felipe Calderon decided to deploy tens of thousands of soldiers across the country to crack down on drug cartels in 2006.

But gang violence surged throughout Mexico, leaving 70,000 people in its wake when Calderon left office in December, and a powerful new cartel, the Knights Templar, emerged in Michoacan.

Osorio Chong has insisted that the strategy ordered by current President Enrique Pena Nieto will be different than his predecessor's, with a single command, close coordination between various authorities, greater use of intelligence assets, and an economic development program.

Pena Nieto took office in December vowing to switch the focus toward reducing the level of violence. He has since launched a crime prevention program but he says troops will stay until the murder rate declines.

Fed up with crime, vigilantes have appeared in recent months and clashed with the Knights Templar cartel, notably in Tierra Caliente.

Drug gangs have existed for decades in Michoacan, where they grow marijuana and opium poppies and produce synthetic drugs in makeshift labs before shipping them to the United States.AFP