The amnesty will only apply to Congolese militia in the east
MPs in the Democratic Republic of Congo have passed a law granting amnesty to militias in the east of the country.
It is the culmination of various deals to bring peace to the North Kivu and South Kivu provinces, a BBC correspondent in Kinshasa says.
It will include "acts of war" committed since 2003 but does not offer amnesty to those accused of war crimes such as rebel leader Laurent Nkunda.
Gen Nkunda remains in detention in Rwanda since his arrest in January.
DR Congo has applied for his extradition.
A Tutsi like Rwanda's leaders, Gen Nkunda had guarded Rwanda's western flank against attacks by ethnic Rwandan Hutu rebels - the Democratic Front for the Liberation of Rwanda (FDLR) - some of whose leaders have been linked to the 1994 Rwandan genocide.
Government spokesman Lambert Mende told the BBC the amnesty would only to apply to Congolese militia and would not cover crimes committed by foreign rebel groups.
The legislation, passed by 298 votes to 29, will take effect after being signed into law by President Joseph Kabila, AFP news agency reports.
The BBC's Thomas Fessy says some opposition lawmakers boycotted the vote on the grounds that the amnesty should apply nationally.
Despite elections in 2006, won by Mr Kabila, the east of the country has been plagued by continued insecurity.
The on-and-off fighting between rebel groups, the army and pro-government militias has forced hundreds of thousands of people from their homes.
Observers say this law may bring eastern DR Congo closer to peace.
It may well convince former rebels who have not joined the national army to do so, our reporter says.
A delegation from the rebel group formerly led by Mr Nkunda is holding talks with government officials in Kinshasa to discuss the implementation of the peace deal.
Since their former leader was arrested, the movement has appointed a new head and it is to be officially recognised as a political party.