The Yemeni parliament on Saturday approved a law granting outgoing President Ali Abdullah Saleh immunity from prosecution, the state news agency SABA reported.
With this approval, the law goes into effect immediately. The parliament also endorsed Saleh's deputy, Abd Rabbo Mansour Hadi, as a nominee in the presidential election set for February 21, dpa reported.
Prime Minister Mohammed Salem Basindwa, a former opposition leader, burst into tears as he appealed to parliamentarians to vote for the law.
"The country is facing dangers of dismemberment and fragmentation," he told parliament. "Help this country overcome these dangers and avoid turning it into another Somalia or Afghanistan"
Under recent amendments introduced to the draft, Saleh is to get full immunity while his aides are to be prosecuted for potential criminal offences, according to SABA.
Protesters across Yemen have been demanding that Saleh be brought to justice for his alleged involvement in corruption and other crimes.
The opposition blames Saleh, his security forces and armed loyalists for killing hundreds of people since an uprising erupted in February against his 33-year rule.
In November, Basindwa and Saleh signed a power transfer deal aimed at ending the unrest in the country. The agreement granted Saleh immunity from prosecution in return for his relinquishing power to his deputy.
As the parliament vote was underway, thousands of Saleh's opponents demonstrated in the capital Sana'a against granting him immunity.
"This immunity only concerns those who approved it," said Man'a al-Mutari, an anti-Saleh activist.
Meanwhile, at least one person was killed in clashes between insurgents linked to al-Qaeda and residents in the south-eastern town of Rada'a, Mareb Press reported online.
The fighting erupted when al-Qaeda militants attacked the district of Haziz in Rada'a in a bid to capture it, the report said, quoting local sources.
This week, more than 200 armed radicals seized army positions and the famous al-Amiriya castle in Rada'a, making it the closest town to Sana'a to be controlled by al-Qaeda-affiliated militants.
In the past two days, they have been pushing for greater control of the town, located 150 kilometres south-east of Sana'a.
Their chief, Tariq al-Dahab, is a relative of al-Qaeda's spiritual leader in Yemen, Anwar al-Awlaki, who was killed in a US airstrike last year.
Militants believed to be affiliated to al-Qaeda have taken advantage of the political turmoil in Yemen to expand their influence in the impoverished Arabian Peninsula country.
The opposition accuses the authorities of complicity with the insurgents, as a means of extending Saleh's grip on power.
Saleh has portrayed himself as the only one who can fight al-Qaeda, and has used the threat of militants to seek support from the West and extend his time in power.