The deputy head of Libya's ruling National Transitional Council (NTC) says he has resigned amid growing protests against him.
Abdel Hafiz Ghoga told Al-Jazeera TV that he was resigning in the national interest.
Several hundred protesters stormed the NTC headquarters in the second city Benghazi on Saturday.
Observers say it was the most serious show of anger at the new authorities since Col Muammar Gaddafi was ousted.
Mr Ghogha, an NTC spokesman, has become a focus for protesters demanding more openness from the NTC.
They accuse him of being an opportunist, who switched allegiances from the regime of Col Gaddafi as the uprising gained strength.
"My resignation is for the benefit of the nation and is required at this stage," Mr Ghoga told Al-Jazeera.
"Unfortunately, the consensus has not continued to maintain the highest national interests. The atmosphere of deprivation and hatred has prevailed... I do not want this atmosphere to continue and negatively affect the National Transitional Council and its performance," he added.
The NTC headquarters in the eastern city of Benghazi - from where the uprising against the Gaddafi regime began - has been the focus of protests in recent weeks.
But Saturday night's protest turned violent, with the AFP news agency reporting that some protesters threw homemade bombs while others armed themselves with stones and iron bars before ransacking the building.
Many protesters believe the revolution that toppled Col Gaddafi is being taken away from them by people only interested in the money, the BBC's Gabriel Gatehouse in Libya says.
The head of the NTC, Mustafa Abdel Jalil, spoke to protesters on Sunday and urged them to have more patience.
"We are going through a political movement that can take the country to a bottomless pit," he said. "There is something behind these protests that is not for the good of the country."
"The people have not given the government enough time and the government does not have enough money. Maybe there are delays, but the government has only been working for two months. Give them a chance, at least two months."
According to Reuters news agency, when asked if Mr Ghoga would step down, Mr Abdel Jalil said he would not.
Our correspondent says Mr Ghoga's resignation adds to a current feeling of instability and flux in the country, and a sense that the NTC is not really in sole control.