At least 19 inmates have been killed and more than 20 injured in a riot in a prison in the northern Mexican state of Durango, security officials say.

Smoke was seen rising from the prison in the town of Gomez Palacio, and gunshots were heard.

Officials said the violence resulted from rivalry between gangs in the jail.

State official Jorge Torres said that while the situation was now calm the overall atmosphere was tense. He described the prison as a "time bomb".

He told Mexican TV the fighting was a "dispute for dominance" and suggested that inmates being held on federal drug and organised crime-related charges might be behind the violence.

'Dynamics disturbed'

"We have a significant number of criminals linked to organised crime," he said, quoted by the Associated Press news agency.

"I think it is precisely the federal inmates who disturb the internal dynamics of the penitentiary, and they place the governance of it at constant risk."

Durango has been the scene of clashes between the Gulf and Sinaloa drug cartels in recent months.

President Felipe Calderon has declared war on the illegal narcotic organisation in Mexico, deploying 40,000 troops to fight the cartels.

Thousands have been killed in drug-related violence in the last few years.

Drug gangs have been involved previously in prison escapes and rioting.

In May, an armed gang believed to be linked to the Gulf cartel broke into a jail in the state of Zacatecas and freed more than 50 inmates.