At least 28 inmates have been killed after a fight broke out in a prison in the Mexican Pacific resort of Acapulco.

It is one of the worst outbreaks of violence in the country's troubled penal system in recent years.

Acapulco is the biggest city in Guerrero, one of Mexico's most lawless states and a centre of opium poppy production that has been a major concern to US officials.

The prison carnage came the same day US Department of Homeland Security Secretary John Kelly was visiting Guerrero, in Mexico's southwest.

Guerrero state security official Roberto Alvarez told reporters the fight broke out between rival gangs in the maximum-security wing of the prison.

In addition to 28 dead, three people were injured, he said.

Relatives await news after the prison riot

Authorities found bodies throughout the wing, inside and outside the kitchen, as well as the area for conjugal visits, he said.

A law enforcement official, speaking on condition of anonymity, said four of the dead were decapitated.

Mr Alvarez told Reuters the prison was close to 30% overcapacity.

Despite reports of gunfire in the prison, all the casualties were due to wounds from sharp instruments, such as the improvised weapons that are fashioned by inmates, he said.

Violent crime in Mexico has jumped in recent months and 2017 is on track to be one of its bloodiest on record.

The number of murder cases in the first five months of 2017 jumped nearly 30% and murder investigations hit a record high in May.

Drug gangs have been battling for control amid a power vacuum following the January deportation of Sinaloa cartel boss Joaquin "El Chapo" Guzman to the US.

The United States and Mexico are discussing how to crackdown on the cartels now that most of the established capos have been killed or captured in a decade-long, military-led campaign.