A revolt by local police who barricaded themselves inside a station for nearly two weeks in a labour protest erupted in a clash that wounded at least five federal agents in southern Mexico on Friday.

Between 250 and 300 local police officers have been hunkered down in the station in the town of Santa María Coyotepec for the last 13 days to demand raises and better working conditions, the Oaxaca state government said in a statement.

They shot at federal police who tried to remove them on Friday, the government alleged. Five federal agents were wounded in the legs by bullet shrapnel, but their lives were said not to be in danger.

Some of the local officers contended it was not them but rather federal agents who opened fire in the pre-dawn confrontation.

“The federal police tried to get in through the main door, but my companions reacted and the clash began,” said a policeman inside the compound who gave his name as only Luis for fear of possible reprisals.

Jeyco Pérez, identified as one of the leaders of the revolt, told Milenio TV that they were only using shields to defend themselves and had not fired weapons.

An Associated Press reporter at the scene saw the local officers carrying batons and riot shields, but no weapons were readily visible. The entry to the station was barricaded with a truck and metal fencing.

The locals captured at least three federal officers but later released them.

One, Mauricio Villela, said he was not harmed during his seven hours of captivity. He denied that it was federal police who opened fire, saying, “We did not shoot.”

Hundreds of police remained in the area of the station, which the state government said holds more than 3,000 firearms and nearly 500,000 rounds of ammunition.

The Oaxaca state security commissioner, Víctor Altamirano, told Milenio that the operation seeks to keep those munitions from being misused by the local police.

Just before midday about 50 people who were apparently civilian residents of Santa María Coyotepec gathered at the station holding signs in support the protest.

The town is about 3 miles (5km) south of the state capital, also named Oaxaca.