Yemen's embattled president, Ali Abdullah Saleh, will remove himself from office within 30 days, under a deal that gives him immunity from prosecution.
Saleh made the announcement himself, in Riyadh, Saudi Arabia, after months of protests calling for his ouster. He will hand power to his vice-president, Abed Rabbo Mansour Hadi, who will rule until a new president is elected, within 90 days.
Protests in the country have been numerous in frequency and population since February, mirroring similar occurrences in Tunisia, Egypt, and Libya. Violence in protests in Sanaa, the capital, and other cities has increased in recent weeks. Troops have opened fire on protesters, killing hundreds of people.
Saleh, who promised to step down a few times before but backed down each time, narrowly escaped assassination in an attack in June. He was in Saudi Arabia for several weeks recovering from a wound he sustained in the attack.
As part of the deal, the new government will include members of Saleh's governing party and of opposition parties.
A large group of protesters in Sanaa greeted the announcement with suspicion, especially since one of their key demands has been that Saleh face trial for alleged crimes against humanity.
Saleh has been the leader of his country for 33 years.