Parliament in Yemen has voted to approve immunity from prosecution for President Ali Abdul al Saleh, who recently signed a deal to formally step down next month.
The law will also give partial legal protection to Mr Saleh's closest aides.
The president handed over power to his deputy in November in return for immunity from prosecution after a year of political turmoil that left hundreds dead.
Security forces controlled by the president and his family, as well as armed loyalists, have been accused of killing anti-government protesters.
Mr Saleh has ruled Yemen since 1978. The BBC reports one of the main issues was whether key aides, including his sons, would also get immunity. The law passed by parliament does give them some legal protection, but not full immunity.