Guillermo Arias, Associated Press
Relatives of inmates at La Mesa state penitentiary cry as they wait outside the prison after a riot in Tijuana, Mexico. Three inmates were killed and at least 31 injured.

TIJUANA, Mexico — Mexican police and soldiers on Monday quelled a riot at a Tijuana prison that left three inmates dead and at least 31 prisoners and officials injured.

Baja California state police spokesman Agustin Perez said one inmate was beaten to death by other prisoners and his body set on fire. The other two inmates were shot to death and authorities were investigating who killed them, he said.

At least 31 people were injured in the violence, six police officers among them, Perez said.

About 60 percent of La Mesa prison in Tijuana was burned in the melee, said firefighter Capt. Rafael Carrillo.

Columns of smoke rose from the prison as inmates gathered on the roof and hung banners protesting alleged abuse by guards at the state penitentiary in Tijuana, across the border from San Diego. Several of the banners said that prison guards had killed at least two prisoners, beating one man to death on Saturday.

"No more dead," one banner read. "The guards are assassins."

Perez confirmed 19-year-old inmate Israel Marquez was killed Saturday during a confrontation with three guards who searched his cell and found drugs and cell phones.

He said one of the guards was arrested and that the other two are being sought.

Baja California's Public Safety Secretary said the riot started Sunday afternoon while guards were searching cells for drugs and arms.

Early Monday, state and federal police aided by soldiers retook control of the penitentiary, said a city police spokesman.

Heavily armed police ringed the penitentiary Monday afternoon, along with inmates' relatives seeking information about their loved ones.