Prime Minister of Libya’s internationally recognised government, Abdullah al-Thani, announced his resignation in a surprising move on national television. His announcement came only hours after peace talks between rival factions in the State had restarted.

During a talk show, Prime Minister al-Thani faced a barrage of questions from angry citizens who blamed his government for the lack of basic amenities, such as electricity and security issues in areas under its control.

If my exit is the solution, then I announce it here,” al-Thani said during the talk show, adding that “my resignation will be submitted to the parliament on Sunday” (as quoted in Economic Times ).

The Prime Minister was also hit with accusation of corruption against his government during the television interview on August 11.

Libya, which plunged into chaos soon after the 2011 Arab Spring that led to the fall of its leader Muammar Gaddafi, has currently two rival parliaments vying for power. Several militia groups are also battling for control of the country’s vast resource wealth.

Al-Thani’s elected government has been working out of a small eastern city near the border of Egypt, after an Islamist militia group took over control of the capital Tripoli last year. He became the Prime Minister of Libya on March 11, 2014.

A few hours before the PM’s announcement, the two rival factions started a new UN sponsored set of peace talks in Geneva, Switzerland in the hope of creating a unified government, with representatives of the powerful Tripoli parliament joining the negotiations after boycotting them last month.

The UN special envoy Bernardino Leon, who is brokering the talks, has urged the key factions to reach a political deal in the hope that a unified government will end the ongoing violence in the country.

Libya has been gripped with civil war for too long now, these peace talks are the best way to bring peace to Benghazi – the main city in the eastern region, which is caught in a daily war between pro-and-anti-government militia forces.