Yemen's veteran President Ali Abdullah Saleh has signed a Gulf plan under which he will cede power.
Saudi state television broadcast live images of Mr Saleh signing the accord in the presence of Saudi King Abdullah and Crown Prince Nayef.
Yemeni opposition officials signed the accord after Mr Saleh.
According to the agreement, Mr Saleh will, on signing, immediately hand "all necessary constitutional powers to his deputy Abdrabuh Mansur Hadi," a diplomatic source said earlier today.
His trip to the Saudi capital "comes in response to an invitation by the Saudi leadership to attend the signing of the Gulf Initiative and its implementation mechanism ... to take the country out of its crisis," it said.
Mr Saleh has repeatedly refused to sign the initiative, triggering months of political deadlock that has left the government in a state of chaos and the economy in shambles.
The political crisis has also exacerbated tension on the street where tens of thousands of anti-regime protesters have faced a brutal ten-month government crackdown that has left hundreds dead and thousands wounded.
The plan submitted by the six-nation Gulf Cooperation Council will effectively bring an end to Mr Saleh's 33-year rule.