Syrian President Bashar al-Assad has declared an amnesty, and troops who deserted but did not fight against the regime may be pardoned if they surrender within a month, state news agency SANA reported.
"President Assad has issued decree number 23, granting a general amnesty for crimes committed before April 16, 2013," said the agency.
But there were important exceptions to the types of crime it covers.
The amnesty is applicable to just one crime classified under the Terrorism Act, namely failing to inform the authorities about rebel activity.
Other acts such as possessing leaflets that encourage "terrorism" and taking up arms against the regime are not covered.
"Army deserters may be pardoned, if those still in Syria hand themselves in within 30 days, and those outside Syria hand themselves in within 90 days," said the decree.
Under the decree, "the death penalty will be replaced with a life sentence of hard labour," said SANA, stipulating that "those who financed terrorist groups or who committed terrorist acts that led to death and destruction are not covered".
"Those who conspired to carry out a terrorist act have their sentence reduced by a quarter, and those who knew about such an act and did not inform the authorities are covered by the amnesty," said the decree.
It will not apply to those who smuggled weapons or drugs, though smugglers of other products will be amnestied as long as they pay reparations.
Those convicted for prostitution-related crimes would also be pardoned.
Army deserters "who stole weapons from the army's warehouses and refused to obey orders" are not covered by the amnesty, the text added.
Armed civilians who hand their weapons in within 30 days can also benefit from the amnesty, although those who incited sectarian strife or published false news are exempted.
The regime describes Assad's opponents and rebels fighting his troops as "terrorists"..
On the eve of Syria's independence day, Justice Minister Najem al-Ahmad said on Tuesday the amnesty "will reinforce social reconciliation, national cohesion, and (cater to) the need to live together on the occasion of this public holiday".
"The amnesty covers the majority of crimes, on different levels," SANA quoted the minister as saying, though it excludes "a small number of crimes, mainly those linked to terrorism, espionage and treason".
State television said the decree would lead to the release of 7,000 detainees.
But Syrian Observatory for Human Rights director Rami Abdel Rahman said he was sceptical.
"It is not the first time Assad passes an amnesty, and this will not lead to the release of tens of thousands of detainees," he told AFP.
"A real amnesty would involve the liberation of all prisoners of conscience and the revolutionaries. An amnesty would mean putting an end to detention."
In mid-March 2011 peaceful protests against the regime began but later morphed into an armed insurgency after the army unleashed a brutal crackdown against dissent.
More than 70,000 people have been killed in Syria's conflict, the United Nations says.