Mexican authorities have begun handing out blue uniforms and assault rifles to vigilantes in the country's western region, legalising a movement that formed last year to combat a vicious drug cartel.
Scores of farmers lined up at a cattle ranch on Saturday 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 Templars 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 spread to some 30 towns, brought fears that it could turn into a dangerous paramilitary force.
The violence in Michoacan 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, 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 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.
The movement's leadership has faced turmoil, too.
On Thursday, the council of self-defense 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 Mireles had cost the lives of five civilians, but it did not elaborate.
Authorities said on Friday they are investigating whether Mireles had a role in the deaths.
Mireles could not be reached for comment.
Another founder of the movement, Hipolito Mora, was arrested in March on charges that he was behind the murders of two fellow vigilantes. He has rejected the charges.
Mireles, a tall, mustachioed doctor, told a radio station this week that the vigilante movement was divided and infiltrated by criminals.
Later he released an Internet video message asking Pena Nieto for a direct dialogue and saying he needed a new security detail because he feared for his life.
After the authorities took down three of the four main Knights Templar leaders, the vigilantes signed an agreement last month to register their guns and put them away at home, or join the rural force.
The militias and the government are still hunting for the cartel's last top leader, Servando Gomez, alias La Tuta.
Alfredo Castillo, Pena Nieto's special security envoy to Michoacan, said the vigilantes had registered 6,442 of an estimated 7,000 weapons as of Friday, including 4,497 military-grade guns.
More than 3,300 vigilantes have signed up to join the police force, officials said. The vigilantes have said that they have 20,000 people in their ranks.