The move came after some 5,000 people signed a petition for the release of the woman, named Gulnaz, who has served two years in prison after a relative raped her at her home. She has been raising the child she had by her attacker in a prison cell in Kabul.
The case again highlights the poor state of women’s rights in Afghanistan, 10 years after a US-led invasion ousted the Taliban who were notorious for their harsh laws against women.
Elsewhere in Afghanistan on Thursday, it emerged that a teenage girl and her family were sprayed with acid after apparently rejecting a marriage proposal for her.
Following the outcry over Gulnaz’s case, Karzai called a meeting where judicial officials decided to pardon her, said presidential spokesman Aimal Faizi.
But the officials also said that Gulnaz should marry the man who attacked her, due to fears she could be in danger if released because of the stigma surrounding her attack in Afghanistan.
She consented to the union, Faizi said.
"She agreed to the marriage but only if his (the attacker’s) sister marries Gulnaz’s brother," the spokesman added, explaining that this was a way to try and ensure Gulnaz was not attacked by the man in future.
Faizi insisted that her release from prison was not dependent on her agreeing to marry her attacker.
Violence against women in Afghanistan appears to be increasing rather than decreasing, despite billions of dollars of international aid which has poured into the country during the decade-long war.
The Afghan Independent Human Rights Commission logged 1,026 cases of violence against women in the second quarter of 2011 compared with 2,700 cases for the whole of 2010.
Some 87 percent of Afghan women report having experienced physical, sexual or psychological violence or forced marriage, according to figures quoted in an October report by the charity Oxfam.
Last week, the United Nations said that a landmark law aiming to protect women against violence in Afghanistan had only been used to prosecute just over 100 cases since being enacted two years ago.
In the acid attack, a 17-year-old girl called Mumtaz was seriously injured when caustic liquid was sprayed on her face by masked gunmen who broke into her home in the northern city of Kunduz late on Sunday, her father Sultan Mohammad said.
Her mother and four sisters also suffered burns in the attack after they were splashed with the acid aimed at Mumtaz, he added.
"It was midnight," Mohammad said from his hospital bed.
"They entered my home by force, they started beating me and put me in a big bag. They moved in and started beating my wife and daughters and before leaving, they sprayed acid on my daughter’s face."
Mumtaz, who is also still in hospital and hardly able to speak, said: "First they beat me, they beat my mother and sisters and then they threw acid on my face."
Mohammad blamed a former militia commander who had proposed marriage to Mumtaz but was rejected by the family.
"A man asked for her hand. We rejected (him) and our daughter was engaged to someone else. I suspect that man might be behind this," he said.
The attackers fled the scene before the police arrived.
Afghan Interior Minister Bismullah Mohammadi has "personally ordered" police to investigate and "administer justice to those responsible", his office said.