Mahmoud Jibril, the former head of the Libyan rebel government that overthrew longtime ruler Muammar Gaddafi in 2011, has died from the coronavirus, his party said.

Jibril, 68, died on Sunday in Cairo where he had been hospitalised for two weeks, said Khaled al-Mrimi, secretary of the National Forces Alliance, founded by Jibril in 2012.

More:

He had been admitted to the Ganzouri Specialized Hospital in Cairo on March 21 after suffering from cardiac arrest and three days later tested positive for coronavirus, hospital director Hisham Wagdy said.

"He started ... recovering the day before yesterday but then he began deteriorating again," Wagdy told the AFP news agency, confirming that Jibril died at 2pm local time.

He was an economic advisor to the Gaddafi government in its final years, before joining the revolution in 2011.

Jibril headed the rebel National Transitional Council (NTC), the interim government during the NATO-backed rebellion that toppled and killed Gaddafi.

In the early days of the Libyan uprising, Jibril made several trips abroad to rally European and US support for the rebels against Gaddafi.

He was interim leader until the country held its first free elections in four decades in 2012.

Jibril stood in the elections and his party won the vote but failed to clinch a majority in parliament, which chose an independent candidate to become prime minister.

Amid the chaos and violence that erupted in the following years, Jibril left Libya to live abroad.

Before Jibril's death, Libya's internationally recognised government in Tripoli had confirmed 18 coronavirus cases in the country and one death.

Wagdy, the hospital director in Cairo, said that Jibril was in and out of consciousness during his time in the hospital's intensive care unit, where he had been quarantined since his admission.

Mrimi said that Jibril had appeared to be in a stable condition in recent days "and was even getting ready to leave the hospital" before his condition deteriorated again.