Authorities in Mexico have recorded 2,234 murders in June, making it the country's deadliest month in at least 20 years, according to government data.

Killings rose in states ranging from the tourist haven of Baja California Sur to the Gulf coast state of Veracruz and even in Mexico City, long considered a relative oasis from drug cartel violence.

For the first six months of 2017, authorities nationwide recorded 12,155 homicide investigations, 31 percent more than the 9,300 during the same period last year.

Just on Friday, the same day the report was released, a marine and four other people were killed when armed forces moved against the leader of the principal fuel-theft ring in the central state of Puebla.

Four of the dead were alleged members of "Los Bukanas", a violent gang that sells petrol stolen through illegal taps in the government oil company's pipelines.

It is a business that has been estimated to cost the government $1bn annually and which has grown increasingly violent as authorities try to control it.

Also on Friday, the top prosecutor in the western state of Jalisco, Eduardo Almaguer, said authorities discovered two drug cartel training camps where they believe about 40 people had been trapped and trained after being tricked by online job advertisements. An unknown number of human remains were also found.

On Thursday, a neighbourhood on the south side of Mexico City exploded in gunfire and eight people were killed as marines tried to capture the leader of a drug gang that controlled street-level drug sales in part of the city.

Growing struggles

The events underscore the growing struggles between or against organised crime groups from one end of the country to the other.

Murders remain high in states that have traditionally struggled with violence like Guerrero and Mexico state.

But they have also shot up in states unaccustomed to such bloodshed, like Baja California Sur, the home of the Los Cabos tourist resorts, and the Pacific coast state of Colima.

The border state of Chihuahua, which had found some relief from the violence that peaked in 2010, has found its murders in 2017 running about 55 percent ahead of where they were last year.