At least three inmates died and others were injured at a prison in Lebanon's east on Friday, after a fire broke out during a riot, a security official told AFP.

"Clashes broke out between security personnel and prisoners" at the facility in Zahle city after wardens foiled a prison break, said the official, requesting anonymity as they were not authorised to brief the media.

Detainees lit fires in their cells, leading to chaos and "leaving three dead", the source added.

The state-run National News Agency reported a massive deployment of army and police at the facility, which was cordoned off, and said 16 other people were injured.

Local media reported the prison housed more than 600 detainees.

The fire spread rapidly through upper floors of the building, causing major damage, the official said, adding that "entire cells burned and are no longer fit" for use.

Overcrowding is a major problem in Lebanon's prison system, where around 80 percent of inmates languish in pre-trial detention, according to interior ministry figures from 2022.