Authorities have begun handing out blue uniforms and assault rifles to vigilantes in western Mexico, legalising a movement that formed last year to combat the vicious Knights Templar drug cartel.

Scores of farmers lined up at a cattle ranch to receive the uniforms of the newly created rural state police force in Tepalcatapec, one of the towns that founded the self-defence militias in the lush agricultural state of Michoacan.

The units were also making their debut in the neighbouring town of Buenavista, which revolted in February 2013 against the cult-like Knights Templar gang because local police failed to protect them.

"With this we become legal," said the white-bearded vigilante leader Estanislao Beltran, nicknamed "Papa Smurf", after slipping into his blue uniform. "We are part of the government."

The new rural police officers then sang the national anthem at a formal swearing-in ceremony in the town square.

The federal government, which had tolerated the vigilantes, has warned that anybody found carrying weapons illegally after Saturday's deadline to join the police will be arrested.

But vigilante leaders said they still had to hash out details on pay and who would be in command, though they would work alongside the regular state police.

The rise of the vigilante movement, which has spread to some 30 towns, brought fears that it could turn into a dangerous paramilitary force.

The violence in Michoacan has turned into one of the biggest security challenges to president Enrique Pena Nieto, who deployed thousands of troops to restore order last year and named a special security envoy earlier this year.

The transition comes amid deep divisions within the vigilante movement, with accusations that it is infiltrated by cartels and the recent arrest of one of its founders.

Authorities have also found several cases of criminals posing as vigilantes.

Late on Friday, 135 "pseudo-vigilantes" were arrested in La Mira, near the port of Lazaro Cardenas, after clashing with troops, a state security official told AFP.

Prominent vigilante fired after five deaths

The movement's leadership has faced turmoil, too.

On Thursday, the council of self-defence forces in more than 30 towns announced the dismissal of its chief spokesman, Jose Manuel Mireles, who was absent from Saturday's events.

The council accused him of making public statements without clearance that undermined the movement.

It also said "recent actions" by Mr Mireles had cost the lives of five civilians, but it did not elaborate.

Authorities said on Friday they are investigating whether Mr Mireles had a role in the deaths.

Mr Mireles could not be reached for comment.

The tall, moustachioed doctor, told a radio station this week that the vigilante movement was divided and had been infiltrated by criminals.

He later released an internet video message asking Mr Pena Nieto for a direct dialogue and saying he needed a new security detail because he feared for his life.

Another founder of the movement, Hipolito Mora, was arrested in March on charges that he was behind the murders of two fellow vigilantes. He rejects the charges.

AFP