At least 40 inmates have escaped from a prison in the southern Libyan city of Sabha after the jail came under attack by unknown gunmen, a security official has said. 

The local official said on Saturday that the gunmen opened fire on the prison a day earlier and helped the inmates to escape after threatening the guards.

He spoke on condition of anonymity as he was not allowed to brief reporters.

Libya's state news agency LANA quoted prison director Shaaban Nasr as saying that many of detainees later handed themselves in.

Jailbreaks are frequent in Libya, where the nascent police and army have been unable to secure the country and rely on armed militias who fought in the 2011 civil war that toppled long-time ruler Muammmar Gaddafi and often act above the law.

Source: AP