"This is what will happen to those who support the Knights Templar," read a note left with the severed heads of four men outside a church in the troubled Mexican state of Michoacan.

Police said the heads found in the town of Zacan were covered by rubbish bags and belonged to men aged between 22 and 55, who may have been members of the feared drugs cartel. In recent months it has been locked in a struggle with gangs of armed locals.

In nearby Tinguindin, a mass grave containing 20 bodies was discovered. Police are attempting to establish when they were dumped in the pit.

It comes two days after two severed heads were left outside a bank in the town of Paracuaro, "For all those who switched sides," an accompanying note read, which has been interpreted as a warning to cartel snitches.

Earlier this week Mexican president Enrique Pena Nieto pledged to spend $3 billion on infrastructure projects in the province to boost the economy and reverse "institutional weakness".

The state had been turned into a hub for the production and exportation of methamphetamine and other drugs by the Knights Templar, who are named after the order of medieval knights and operate according to a quasi-religious code.

Gangs of locals tired of years of extortion and the corruption of local police and law enforcement took up arms against the Knights Templar last year, driving them out of several towns and villages, and laying siege to their stronghold in Apatzingan.

In mid-January thousands of federal police were deployed in the state, and after initially being called on to disband, the militias have now been given permission to retain their weapons if they register with the military and work alongside the police.