But when the announcement also made it clear that there was an expectation that the woman, Gulnaz, would agree to marry the man who raped her, the moment instead revealed the ways in which even efforts guided by the best intentions to redress violence against women here run up against the limits of change in a society where cultural practices are so powerful that few can resist them, not even the president.
The solution holds grave risks for Gulnaz, who uses one name, since the man could be so humiliated that he might kill his accuser, despite the risk of prosecution, or abuse her again.
The decision from the government of President Hamid Karzai is all the more poignant coming as Western forces prepare to leave Afghanistan, underscoring the unfinished business of advancing women's rights here, and raising questions of what will happen in the future to other women like Gulnaz.
Indeed, what prompted the government to act at all was a grass-roots movement that began after Gulnaz was featured in a recent documentary film commissioned by the European Union, which then blocked the film's release.
Supporters of the filmmakers charged that European officials were shying away from exposing the sort of abuses Afghan women routinely suffer for fear of offending their host government.
While Gulnaz's pardon is a victory for both Clementine Malpas, a filmmaker who spent nearly six months on the documentary, and for Kimberley Motley, an American lawyer here who took Gulnaz's case on a pro bono basis, it also shows that for women in the justice system, the odds are stacked against them.
The banned film, "In-Justice: The Story of Afghan Women in Jail," which was seen by The New York Times, profiles three Afghan women who were in prison. One was Gulnaz, then about 19, who gave birth to the child of her rapist in prison, after initially being sentenced to three years. In a second trial, her sentence was increased to 12 years, but a judge on camera offered her a way out: marry her rapist.
A second woman in the film was abused by her husband and ran away with a man she fell in love with; both are now in prison for adultery. The third woman was a child of 14, who appeared to have been kidnapped but was held as a runaway and has since been returned to her family.
After the film was completed, the European Union banned its release, effectively silencing the women who were willing to tell their stories. The reason given for the ban was that the publicity could harm the women, because an Afghan woman who has had sex out of wedlock can easily become the victim of a so-called honor killing. The women had not given their written consent to be in the film, said Vygaudas Usackas, the European Union's ambassador to Afghanistan.
But an e-mail obtained by The Times from someone supportive of the filmmakers suggested that the European Union also had political reasons for the ban.
The e-mail addressed to the filmmakers by the European Union attaché for justice, the rule of law and human rights, Zoe Leffler, said the European Union "also has to consider its relations with the justice institutions in connection with the other work that it is doing in the sector."
Even if the women in the film "were to give their full consent," the European Union would not be " willing to take responsibility for the events that could ensue and that could threaten the lives of the documentary's subjects," the e-mail said.
Mr. Usackas said that concern for the women was central in the European Union's decision. "Not only does the E.U. care about women, but we have spent over 45 million euros," about $60 million, "in support of different programs for women," he said, adding that the European Union also finances shelters for women.
Word of the film's suppression percolated through human rights groups here to the point that many in the nascent Afghan women's movement were referring to the victims by name and discussing what would be best for them, given the strictures of Afghan society. Some people circulated a petition urging Gulnaz's release and gathered more than 6,000 signatures, which were delivered to Mr. Karzai.
Although human rights advocates came down emphatically on the side of broadcasting the documentary, Afghan women's advocates were more cautious, having been stung by previous cases.
In 2010, there was widespread publicity of the case of Bibi Aisha, a Pashtun child bride, whose nose was cut off by her Taliban husband; it backfired. Conservative Afghan leaders started a campaign against the nonprofit women's shelters, one of which had helped Bibi Aisha. They came close to shutting down the shelters, which would have been a huge loss for abused women who have no other refuge.
"When we write or produce articles or movies on Afghan women, no matter how horrible the life of Afghan women is, and we know that is the reality of Afghan women, we want to be very careful not to make the situation worse," said Samira Hamidi, country director of the Afghan Women's Network.
"We don't want to block the way for other women who have similar problems and who don't have anyone to help them," Ms. Hamidi said.
But to not show the plight of Afghan women is to reduce the possibility that the government and the society will ever change.
"It is our position in the human rights community that one of the best ways to highlight a human rights issue is to let the victims speak and to publicize what has happened to them to a wide audience," said Georgette Gagnon, an official with the United Nations mission in Afghanistan.
The problem for Gulnaz and the other women in the film is the deeply held belief that women uphold their family's honor. Thus any attempt to expose abuse is so humiliating to the family that a woman who speaks out often becomes a pariah among her relatives, ending up isolated as well as abused.
Gulnaz's case shows the power of cultural norms. On the one hand, the public campaign for the woman prompted the pardon, which ensures that she will be able to bring up her daughter outside prison. On the other hand, the fact that the only imaginable solution to the situation of a woman with an illegitimate child is to have her marry the father - even if he is a rapist - is testament to the rigid belief here that a woman is respectable only if she is embedded within a family.
Ms. Malpas said that Gulnaz talked to her about why she felt that she had to give in to requests that she marry the man who raped her, even though she did not want to, explaining that not only would she be an outcast if she did not, but so would her daughter, and she would bring shame on her family.
"Gulnaz said, 'My rapist has destroyed my future,' " Ms. Malpas said, recounting their conversation. " 'No one will marry me after what he has done to me. So I must marry my rapist for my child's sake. I don't want people to call her a bastard and abuse my brothers. My brothers won't have honor in our society until he marries me.' "
But, mindful of her safety, Gulnaz also said that if she were to marry her rapist she would demand that he make one of his sisters marry one of her brothers, Ms. Motley, the lawyer, said.
This practice, known as "baad," is a tribal way of settling disputes. But in this case it would also be an insurance policy for Gulnaz since her rapist would hesitate to hurt her because his sister would be at the mercy of Gulnaz's brother.
Both Ms Malpas and Ms Motley said that a shelter had been found for Gulnaz and that they hoped she would go there. But whether such a Western option can prevail over Afghan custom - and whether Gulnaz will choose it - is far from clear.