The 19-year-old woman, whose name is Gulnaz, was one of the subjects of a documentary recently produced by the European Union, highlighting the phenomenon of rape victims being imprisoned for the "moral crime" of having sex outside marriage, even against their will.
Karzai's office said in a statement Thursday evening that the president had accepted a recommendation from a special judicial committee that the woman be pardoned and freed -- "taking into consideration the consent of both sides for a conditional wedlock."
Gulnaz became pregnant as a result of the rape and gave birth in prison.
Hundreds of Afghan women are serving jail sentences in similar circumstances. But the documentary coverage of Gulnaz's case sparked a petition drive seeking her freedom, and as a result, judicial authorities reexamined her case.
The European Union said in a statement that it welcomed her release.
Reflecting the sensitivity of the issue, however, the EU had decided earlier not to release the documentary, citing concerns over danger to the women, even though those who were profiled had given the filmmakers permission to use their names.
The film was shown to news organizations and human rights groups, however.
The pardon came ahead of an international summit on Afghanistan to be held in Bonn, Germany, beginning this weekend. Women's activists are using the gathering as a forum for speaking out about fears of renewed repression in the country after the Western combat mission ends in the next two years.
During Taliban times, women were forbidden to leave their homes unescorted. Virtually none attended school or held jobs during the Islamic movement's five-year rule, which ended with the U.S.-led invasion of 2001.
Women's groups, however, say the gains of the last decade are threatened by the government's attempts to negotiate a peace settlement with the Taliban and bring the group into the political process.
-- Laura King
Photo: Afghan President Hamid Karzai speaks in November at the closing ceremony of the loya jirga, or grand assembly, in Kabul. Credit: Ahmad Masood / Reuters