The upper house, which has many warlords as members, approved the bill by a reported vote of 41 to 16. The lower house -- also dominated by individuals alleged to have been involved in war crimes -- approved the bill last month.
The document still needs to be approved by Afghan President Hamid Karzai to become law.
Karzai's spokesman has said that he will not sign the bill. But according to Afghanistan's Constitution, the lower house of parliament can override a presidential veto if a bill is supported by two-thirds of the legislators.
A translation of the bill reads that "all political parties and belligerent groups who fought each other during the past two-and-a-half decades...will not be pursued legally or judicially."
Instead, the bill calls for war criminals to be "included in the national reconciliation process, to make peace between different segments of the society, ensuring peace and stability, to commence and consolidate a new life in the modern political history of Afghanistan."
Rights Groups Disapprove
Among the Afghans accused of war crimes and human rights abuses are the commanders and fighters of the jihad, or holy war, against the Soviet occupation of the 1980s. Afghan factional leaders and their militia fighters also are accused of murder and torture during the 1992-1996 civil war that followed the withdrawal of Soviet forces from Afghanistan.
The draft law says those who fought in the jihad must be respected and honored and "shall be immune to all kinds of animosity."
The bill prompted an outcry from human rights groups, the United Nations, and some Afghan lawmakers who insist that the perpetrators of rape, murder, and other atrocities must be brought to justice.
Lawmaker Shukria Barakzai says the legislation is about empowering factional militia leaders in the parliament rather than seeking justice or achieving national reconcilliation.
The United Nations and Afghanistan's independent human rights commission have said that only the victims of war crimes and other abuses can forgive the perpetrators.
(with material from AFP)
RFE/RL Afghanistan Report
SUBSCRIBE For regular news and analysis on Afghanistan by e-mail, subscribe to "RFE/RL Afghanistan Report."