The attack took place late Thursday as seven vehicles carrying the paramilitary gendarmerie officers were on patrol in Ocotlan, Jalisco state, federal police said.
Eight other officers were wounded, including one in serious condition in the town of 93,000 people.
It was the deadliest shooting for the gendarmerie, a 5,000-strong unit modeled after European military-like police forces that President Enrique Pena Nieto launched last year to protect key economic sectors from organized crime.
“We have regrettably had minor losses of one officer in some other events,” but never so many in a single attack, a federal official told AFP.
– 30-minute gunfight –
A gendarmerie commander deployed in Jalisco said the officers were checking on reports of an attack on municipal police when they were ambushed.
A police statement said the officers were on patrol around 9:15 pm (0315 GMT) when a pick-up truck approached the convoy and “without uttering a word, one of the individuals pulled out a large weapon and shot at the federal agents.”
The officers shot back but more gunmen arrived in about 10 other vehicles. The gendarmerie commander said the shootout lasted 30 minutes and took place on several streets.
“As a result of this clash, we report the deaths of five gendarmerie division officers and three civilians whose bodies had cartridge belts and tactical equipment and who presumably are part of organized crime,” the statement said.
Two male bystanders were killed on the spot and a woman died of her wounds at a hospital, officials said.
The suspects kept shooting as they fled the scene, leaving bullet holes in vehicles parked on several neighboring streets.
Authorities found seven “large weapons” — a term usually used to refer to assault rifles — and four grenades. The suspects left behind five vehicles.
The statement did not specify the criminal gang affiliation of the suspects, but the region is home to the Jalisco New Generation drug cartel.
The group emerged in 2010 after the death of Ignacio Coronel Villarreal, alias “Nacho Coronel,” the top leader in Jalisco for the powerful Sinaloa drug cartel.
Federal prosecutors said they will investigate the attack.
Interior Minister Miguel Angel Osorio Chong expressed his condolences, while federal police chief Enrique Galindo urged any witnesses to report information through the 088 emergency telephone number.
– Other ambushes –
More than 100,000 people have died or gone missing since Mexico’s drug war began to escalate in 2006 with the deployment of troops to combat drug cartels.
Criminals have attacked authorities in Jalisco in recent years.
In September, a federal lawmaker was abducted as he drove to the airport near Guadalajara, Mexico’s second biggest city. His charred body was found hours later in a neighboring state.
In May, a group of 30 gunmen armed with grenades ambushed a military truck near the town of Guachinango, killing four soldiers