An entire police force of 28 officers has been arrested over the murder of a mayoral candidate in western Mexico.

Each officer from the town of Ocampo was cuffed, disarmed, and interrogated by internal affairs officials of the Mexican Secretariat of Public Security.

They are being investigated for possible involvement in the assassination of local mayoral candidate Fernando Angeles Juarez on Thursday.

The town of Ocampo's entire police force of 28 officers has been arrested over the murder of a mayoral candidate in western Mexico

Each officer was cuffed, disarmed, and interrogated by internal affairs officials of the Mexican Secretariat of Public Security

The 64-year-old anti-corruption campaigner was gunned down outside his home in Ocampo by unknown shooters.

Photos in local media show the officers lined on the floor lying face down with their hands cuffed behind their backs.

They were officially being investigated for potential violations of the police code of conduct but authorities didn't give more details.

Mr Juarez was the third politician to be killed in the state of Michoacan in 10 days, and within 24 hours of one of them, Omar Gomez Lucatero.

More than 100 politicians have been murdered in Mexico ahead of next week's general election on July 1.

Ocampo's 28 police and the local public security secretary were arrested by federal forces on Sunday morning.

Local mayoral candidate Fernando Angeles Juarez, 64, was gunned down outside his home on Thursday

Relatives of Mr Juarez carry his coffin during his funeral in Ocampo on Thursday

'All of the officers are being interviewed in accordance with the law,' a secretariat of Public Security statement said.

Following Mr Juarez's murder, local authorities accused Ocampo's public security secretary Oscar Gonzalez Garcia of being involved.

Local police officers prevented federal agents from arresting him on Saturday, leading to a standoff that saw the federales back down.

They returned with reinforcements the next morning and detained Mr Garcia and the police who protected him.

Prosecutors suspect he and the officers of being connected to organised crime groups in Michoacan.

Mr Juarez was running for mayor of the town of 24,000 people about 95 miles west of Mexico City as part of the state's governing Democratic Revolution Party.

Mr Juarez was the third politician to be killed in the state of Michoacan in 10 days and one of more than 120 ahead of the July 1 election

Fellow candidate Oscar Gomez Lucatero (left) was killed on the same day, with his nephew accusing his opponent Osvaldo Maldonado (right)

His party confirmed the assassination and called on the government to provide protection for election candidates.

Mr Juarez was just the latest victim in Mexico's bloodiest-ever election campaign that has claimed the lives of more than 120 candidates, almost all in local contests.

Mr Lucatero was shot dead in the conflict-ridden rural town of Aguililla, where drug gangs and vigilantes are rampant, on the same day as Mr Juarez.

His nephew, in a tearful video message, claimed he had recently been intimidated by an armed group, and blamed the murder on his uncle's opponent Osvaldo Maldonado, who quickly denied involvement.

Mexican security analyst Alejandro Hope said the level of violence could be explained in part by the record number of elections.

Gomez Lucatero's nephew said in a tearful video that the day before his murder, a group of armed men came to his house to intimidate him

With more than 3,400 local, state and federal posts at stake, there are more than 15,000 candidates hitting the campaign trail.

'Secondly, this speaks to the changes in criminal groups. With the evolution of crime, it becomes much more important to gain control over territory, over local governments,' he said.

In crimes like fuel theft, for example, local police can be valuable allies to act as look outs or cover up for illegal pipeline taps and illicit fuel warehouses.

Some gangs have even taken to extorting money from local governments by forcing them to sign inflated public works contracts.

Those concerns could lead the gangs to kill a candidate who rivals their favorite, or ones who refuse their demands.

Mexico is also more violent than it has been in decades with 25,339 people murdered last year.

More than 200,000 people have been killed since the government launched its militarised offensive against drug traffickers in 2006.