Yemeni President Ali Abdullah Saleh has signed a deal under which he will step down, officials say.
Mr Saleh signed the agreement, brokered by Yemen’s Gulf Arab neighbours, in the Saudi capital Riyadh.
Under the deal, he is to transfer his powers to his deputy ahead of an early election and in return will get immunity from prosecution.
The 69-year-old leader – who has ruled since 1978 – has been facing protests since the beginning of the year.
He came close to signing the deal several times in the past, only to pull out at the last minute.
Meanwhile, clashes broke out between pro-Saleh troops and gunmen loyal to dissident chief Sheikh Sadiq al-Ahmar in Sanaa.