"Two groups of criminals exchanged fire" early Saturday, leaving four people dead and three others wounded, the Sonora state police said in a statement.
The shootout occurred in the Centro and Infonavit Industrial sections of Agua Prieta, where gunfire was heard for hours.
Juan Miguel Favela Ramírez, 37, Luis Enrique Ceballos Barraza, 25, and Hector Ulises Romero, 28, all of whom were from the northwestern state of Sinaloa, were killed in the shootout.
The fourth person killed in the incident has not been identified, the Sonora state police said.
The three people wounded in the shootout were identified as Laura Lizbeth Morán Benitez, 25, Manuela Beatriz Pérez Suárez, 25, and Manuel Alejandro Marquez Navarro, 24.
Agua Prieta, located across the border from Douglas, Arizona, is an important crossing point for cargo and people traveling between Mexico and the United States.