The rebels have six months from the date at which President Yoweri Museveni signs the amnesty bill to claim the amnesty by giving themselves up and handing in weapons.
The bill, passed on Tuesday, represents a new approach to two rebellions which have displaced 400,000 people from their homes and seen more than 10,000 children kidnapped in northern and western Uganda in the last 12 years.
Museveni for many years insisted rebels from the Lord's Resistance Army (LRA) and the Allied Democratic Forces (ADF) were criminals and could only be subdued militarily.
But as the war drags on, Museveni has faced growing domestic and international pressure to look for a political solution.
The bill calls for the reintegration of the rebels into society, according to the official New Vision newspaper. The government can extend the amnesty without going back to parliament.
There has been little fighting between the government and LRA rebels in northern Uganda in the last six months, but the army says the ADF has stepped up its attacks on mainly civilian targets in western Uganda this month.
The LRA took up arms shortly after Museveni seized power at the head of a rebel movement in 1986, but has attracted widespread international condemnation for its policy of abducting children to serve as porters or fighters. The ADF started fighting after Museveni won presidential elections in 1996 which they say were rigged.
Local government officials say six people were killed when ADF rebels opened fire on a refugee camp in the Bundibugyo district of western Uganda on Saturday night.
- Reuters - Thomson Reuters Foundation
- For more humanitarian news and analysis, please visit https://www.trust.org/alertnet