After more than 33 years in power, Saleh signed the Gulf Cooperation Council agreement in November 2011, paving the way for his vice president to become acting president until 21 February 2012; at that point the vice president would be elected to the presidency. On 22 January 2012, the Yemeni parliament passed a law that granted Saleh immunity from being prosecuted, and he left Yemen for treatment in the United States.<ref>{{#invoke:citation/CS1|citation
|CitationClass=book
}}</ref><ref name="survivor">{{#invoke:citation/CS1|citation
|CitationClass=news
}}</ref> Saleh stepped down and formally ceded power to his deputy Abd Rabbuh Mansur Hadi at the Presidential Palace on 27 February 2012.<ref name="google1">{{#invoke:citation/CS1|citation
|CitationClass=web
}}</ref>

After more than 33 years in power, Saleh signed the Gulf Cooperation Council agreement in November 2011, paving the way for his vice president to become acting president until 21 February 2012; at that point the vice president would be elected to the presidency. On 22 January 2012, the Yemeni parliament passed a law that granted Saleh immunity from being prosecuted, and he left Yemen for treatment in the United States.<ref>{{#invoke:citation/CS1|citation
|CitationClass=book
}}</ref><ref name="survivor">{{#invoke:citation/CS1|citation
|CitationClass=news
}}</ref> Saleh stepped down and formally ceded power to his deputy Abd Rabbuh Mansur Hadi at the Presidential Palace on 27 February 2012.<ref name="google1">{{#invoke:citation/CS1|citation
|CitationClass=web
}}</ref>