Mexico City (AFP) - The whole police force in a Mexican town of Ocampo where a mayoral candidate was slain this week has been detained for an internal investigation, authorities said Sunday.

"All of them are being interviewed to proceed as due under law in the event anyone has taken part in acts that violate the town's codes," said the security secretariat in Michoacan state, where the town of about 20,000 people is located.

It did not give the exact number of police detained.

Mayoral candidate Fernando Angeles was shot dead last Thursday when he was preparing for campaign events.

The police have been transferred to the internal affairs unit of the state security secretariat, which did not clarify in its statement if the arrest is related to Angeles' killing.

On Wednesday, Omar Gomez, an independent candidate for mayor of Aguililla, also in Michoacan, was shot to death.

On June 14, a candidate for mayor of Taretan, in the same state, was also killed.

Since the campaign season started in Mexico, which will conclude with elections on July 1, more than a hundred politicians and candidates, mostly local, have been murdered.

Mexico is experiencing a wave of violence linked to organized crime that made 2017 the most violent year in two decades, with 25,339 homicides.

More than 200,000 people have been killed and another 30,000 are missing since the government sent out federal forces to fight drug trafficking in 2006.