Continuous automatic gunfire was heard late Tuesday at the prison in Ciudad Victoria, the capital of the border state of Tamaulipas.
The gunfire continued into today morning at the prison, which has been one of Mexico's most troubled lockups.
The state security spokesman's office said today that seven people died and 13 were injured in the shootouts.
Authorities said earlier that the dead included three police officers; it was unclear whether the rest of the dead were inmates.
Inmates at the state prison somehow managed to obtain guns and began fighting authorities. The prison has been the scene of shootings, smuggled guns, riots and escapes. Ciudad Victoria has long been dominated by the hyper-violent Zetas drug cartel.
Inmates have frequently had access to guns in the prison. During the March escape, at least one prisoner had a gun that he used to kill a passing motorist in a carjacking. Police later found two assault rifles buried in a planter in the prison.