Nineteen people were killed in Mexico's northwestern state of Sinaloa late on Friday in a run of related shootouts between police and gunmen, state authorities said.

Armed men in pickup trucks opened fire on a group of police officers on a major highway near the beach resort of Mazatlan, according to the state police and state attorney general's office.

State Public Security Minister Genaro Robles Casillas said in a news conference on Saturday that drug gangs have been fighting over trafficking routes in the area where the violence occurred.

Aided by federal forces, the police fought off the attackers and pursued them to the nearby town of La Amapa, where the gunfight resumed, according to a press release from the state police.

Seventeen gunmen were killed in the shootouts with police, and another two people died nearby in what appears to be earlier, related shootings, the attorney general's office said in another press release.

No police died. However, five suffered gunshots and are in stable condition, with two of those officers suffering head wounds, according to state police.

Found at the scene were 16 semiautomatic rifles, nine handguns and a shotgun, the attorney general's office said.

The coastal state of Sinaloa is a focal point in Mexico's drug war. It is home to the Sinaloa cartel, whose most well known boss, Joaquin "El Chapo" Guzman, was extradited to the United States in January to face trial.

Police killed 17 people for every officer lost in gunbattles in 2014, according to a study by Mexico's National Autonomous University, a number experts say is consistent with excessive use of force.

In 2015, Mexican police executed nearly two dozen suspected gang members after ambushing them at a ranch near the town of Tanhuato in the violent western state of Michoacan, one of the worst abuses by security forces in a decade of grisly drug violence.

Some 30,000 people have disappeared in Mexico since drug violence increased sharply around 2007. Since former president Felipe Calderon sent the army out to battle drug gangs at the end of 2006 more than 150,000 have been killed.