Libya's internationally recognized Prime Minister Abdullah al-Thinni said in a television interview that he would resign, after the station's host confronted him with questions from angry citizens who criticized his cabinet as ineffective.
"I officially resign and I will submit my resignation to the House of Representatives on Sunday," he told "Libya channel", a private TV station in an interview broadcast late on Tuesday.
Thinni has been based in the eastern part of the country since his government fled Tripoli a year ago after the capital was seized by an armed group that set up a rival administration, part of chaos in the oil producing nation four years after the ousting of Muammar Gaddafi.
Thinni has been in office since March 2014. He had said in April 2014 he would resign, saying his family had been attacked but later changed his mind and stayed on.
His cabinet, working out of hotels, has struggled to make an impact in the remote eastern city of Bayda, while citizens complained about shortages of fuel and hospital drugs and a worsening security situation.
Ministries and key state buildings in Tripoli are under the control of the rival administration with its own premier that has not been recognized by world powers.
During the TV interview, Thinni became angry when the host presented him with questions collected from viewers who criticized Thinni for a lack of security, government services and handling of aid for displaced people.
When the presenter asked Thinni what he would do if there were protests, he said: "People do not need to protest against me because I officially resign from my position."
"They can bring a new prime minister with magic to solve all the problems," he said.
Libya's east has been especially hit hard by the chaos as fighting between forces allied to Thinni and Islamist groups in Benghazi has choked off wheat and fuel imports. The violence has also disrupted the power grid.
Libya also struggles with a public finance crisis as the chaos has cut oil production to a quarter of what the OPEC member used to pump before Gaddafi was ousted.
Critics say Thinni's cabinet mainly puts out statements that have no relevance. On Monday, Thinni's government said that Tripoli International Airport would be renamed after the late King Idris, toppled by Gaddafi in 1969.
The airport has been out of action since it was damaged when a rival faction seized Tripoli a year ago. Thinni's administration has no control of the airport.
"His government is a failure," Benghazi lawmaker Amal Bayou posted on her Facebook website in reaction to the resignation announcement, calling Thinni incompetent.