Libyan authorities on Thursday granted immunity to former rebels who fought to oust Moamer Kadhafi's regime and unveiled legislation that cracks down on the fallen strongman's supporters.
"There is no punishment for acts made necessary by the February 17 revolution," read the law published on the National Transitional Council's website.
The immunity covers "military, security or civilian acts undertaken by revolutionaries with the aim of ensuring the revolution's success," the NTC added.
February 17 marks the start of a popular uprising which led to the collapse of Kadhafi's regime last year.
It was unclear if the law includes acts committed after October 23, when the NTC declared Libya's liberation following the capture and killing of strongman Kadhafi.
Rights groups say war crimes were committed by both sides during the 2011 conflict and warn of torture in detention centres run by militias made up of former rebels.
The law also orders the defence and interior ministers to bring to justice Kadhafi's fighters detained by former rebels or release them by July 12 if there is not enough evidence against them.
The ministers must also act against individuals who pose a "threat to the security or stability" of Libya on the basis of their role in the previous regime or their participation in "official and unofficial bodies of the former regime."
These measures could include surveillance, travel bans or barring them from residence in a specific place or region of the country.
Signup to our newsletter and follow us on Facebook and Twitter!
In further legislation to govern the transition towards a new Libya, the NTC criminalised the glorification of Kadhafi or his regime.
"Praising or glorifying Moamer Kadhafi, his regime, his ideas or his sons... is punishable by a prison sentence," said the text of the law read out to reporters by a judicial official after a high-level meeting.
"If those news reports, rumours or propaganda cause any damage to the state, the penalty will be life in prison," the official quoted the text as saying.
"In conditions of war, there is a prison sentence for any person who spreads information and rumours which disrupt military preparations for the defence of the country, spread terror or weaken the citizens' morale," he added.
According to the law, Libya is still in a state of war following the 2011 bloody conflict that pitted Kadhafi loyalists against NATO-backed rebel forces.
A third law for the transition stipulates prison sentences for anyone who "attacks the February 17 revolution, denigrates Islam, the authority of the state or its institutions."
And another law confiscates all property and funds belonging to figures of the former regime, including Kadhafi's relatives, placing them under the care of the judiciary.
The tough legislation comes just weeks before elections for a constituent assembly which the NTC has pledged to hold in June.
Libyan authorities have already disqualified members linked to the Kadhafi regime from running for public office, in regulations that rights group have slammed as "vague."