Outgoing President Ali Abdullah Saleh apologised for any shortcoming in his 33-year rule before leaving Yemen for the United States on Sunday, paving the way for a transfer of power after a year of unrest.
God willing, I will leave for (medical) treatment in the United States and I will return to Sanaa as head of the General People's Congress party, Saleh told senior party and government officials in a televised speech.
The U.S. State Department confirmed it had given him a visa.
The sole purpose of this travel is for medical treatment and we expect that he will stay for a limited time that corresponds to the duration of this treatment, it said.
Saleh tried to sound a conciliatory note in a farewell speech that came a day after he was granted immunity from prosecution under a law passed by parliament.
I ask for pardon from all Yemeni men and women for any shortcoming that occurred during my 33-year rule and I ask forgiveness and offer my apologies to all Yemeni men and women, he said. Now we must concentrate on our martyrs and injured.
An aide to Saleh said he would spend two or three days in neighbouring Oman, but an Omani official told Reuters the veteran ruler would be in transit for only a few hours.
Thousands of Yemenis protested on Sunday against Saleh's immunity and demanded he be put on trial for the killing of hundreds of demonstrators during a year of unrest that brought the impoverished Arabian Peninsula country to the verge of civil war.
Saleh was granted the immunity as part of a plan hammered out by neighbouring Gulf states to ease him from power. Gulf Arab and Western allies fear instability has given al Qaeda militants room to entrench themselves further in remote areas outside central government control.
He leaves behind a divided country.
An opposition-led government formed as part of the deal to get him out of office is preparing for a presidential election on February 21 expected to replace Saleh with his ally and vice-president, Abd-Rabbu Mansour Hadi, in a power-sharing arrangement.
The Yemeni Embassy in Washington said Saleh would return home for the inauguration of his successor.
The president, will travel back to Yemen in February to attend the swearing-in ceremony of the newly elected president. No further details will be provide in advance, the embassy said in a statement.
Saleh remains nominal head of state until then, although he has transferred his powers to Hadi. Saleh said on Sunday he had promoted Hadi to army general, an apparent effort to ensure the army remains the most important institution in a fragmented land of 23 million.
SALEH GONE, BUT SUPPORTERS REMAIN
Many fear that although Saleh may be gone, his supporters will remain in power and continue to dominate the country.
At the capital's airport, dozens of members of Yemen's air force held a sit-in on the runway to demand the resignation of their commander, Saleh's half-brother, accusing him of corruption. Air traffic was halted and riot police with water cannon surrounded the protesters, witnesses said.
Reports from a pro-revolution website run by Saleh's arch-enemy, General Ali Mohsen, said about 600 members of the air force were participating in the sit-in.
Saleh cited what he considered the successes of his rule.
The president has been given immunity by the people after he gave his life in the service of the nation, he said, listing development, infrastructure, energy and mineral sector growth and maintaining the unity of north and south Yemen.
He said those who died during the months of clashes were victims of the youth revolution. He criticised opponents for attacking oil pipelines, blocking roads and cutting electricity.
I call now for reconciliation, except when it comes to terrorism, he said.
Violence in Yemen's south between the military and al Qaeda has increased in recent months, prompting Saleh's opponents to accuse him of ceding territory to Islamists to bolster his assertion that only he can prevent al Qaeda from growing.
ARMY CLASHES WITH MILITANTS
On Sunday, four militants, including a local al Qaeda leader, and one soldier were killed in fighting in Radda, 170 km (100 miles) southeast of Sanaa, a tribal official said. Radda was taken over by an al Qaeda-linked group a week ago.
In Zinjibar, a town on the southern coast where the army has been fighting militants since May, 10 members of a militant group called Ansar al-Sharia were killed on Sunday by the army, a local official said.
Four al Qaeda militants, a soldier and a civilian were killed on Saturday after militants stormed a military police outpost in Mareb province, an Interior Ministry statement said.
The clashes took place after talks between tribal leaders and militants broke down over the Islamists' demands that 16 al Qaeda militants be freed and Islamic law enforced in the town.
In Sanaa, opposition groups not involved in the power transition deal brought thousands of their supporters on to the streets and questioned parliament's authority to approve the immunity law.
We will continue protesting until all of the revolution's goals are achieved, said Mani al-Matari, a leader of a committee set up by youths who led the protests against Saleh.
The parliament has no legitimacy and (instead) we are holding on to international law.
The immunity law does not give full protection to Saleh's aides, leaving them vulnerable to prosecution for crimes considered terrorist acts.
The law does, however, give them immunity for politically motivated crimes committed while carrying out official duties.
Abroad, Saleh could find himself hounded by activists using national courts and international law to try to prosecute him over the killings of protesters and alleged corruption.
(Additional reporting by Firouz Sedarat, Mohamed Mukhashaf, Saleh al-Shaibany and Andrew Quinn; Writing by Andrew Hammond; Editing by Andrew Roche and Peter Cooney)