The Afghan president, Hamid Karzai, has blocked a law that would silence victims of domestic violence, forced marriage and child abuse and demanded major revisions after a campaign by Afghan activists and western diplomats.

The legislation bans relatives from testifying against each other, and in a country where forensic evidence is relatively undeveloped, that would effectively halt prosecution in even the most vicious cases of violence against women, including those mutilated by their husbands or attacked by brothers and fathers.

The provision was inserted into a new criminal prosecution code, much needed and years in the making, at the last minute. It was steered through parliament by a prominent opponent of women’s rights, and conservative MPs resisted efforts to moderate the strict controls.

They apparently also had backing from some sections of government; early on Monday, a justice ministry official told the Guardian that western embassies had simply “misunderstood” the law, and that the expected confusion be resolved soon and without any changes needed.

But just a few hours later, a cabinet meeting chaired by Karzai ordered alterations to the brief section of the law causing the problems, his spokeswoman Adela Raz said. “At the meeting, His Excellency the President, and the cabinet, decided that article 26 needs to be amended.”

She declined to say how the law would be altered, but the public repudiation of what would have been a devastating step backwards for Afghan women was welcomed by activists and diplomats. They had mounted a vigorous lobbying campaign, both in public and behind the scenes, since the legislation first came to light earlier this month.

“Who says advocacy and lobbying does not work? It does and we have seen results!” campaigner Samira Hamidi said, celebrating on Twitter. The European Union welcomed Karzai’s decision to “stop [a] setback for women’s rights”.

The United States, which had previously issued only a brief statement of concern about the law, welcomed Karzai’s decision as a “response to the concerns expressed by many Afghans and their international partners”.

Five years ago, after a similar campaign against a family law that appeared to allow marital rape, the Afghan president ripped up the legislation and shepherded a more moderate version through the houses of parliament.

Raz denied that the president, currently at odds with the US over issues from the election to the long-term presence of foreign troops, had been slow to respond to the latest law in response to foreign or domestic pressure. The draft had been held up by bureaucracy, and Karzai demanded changes as soon as it reached his desk, she said.

“As soon as it arrived, it was brought to the cabinet as any law would be for discussion, and like anyone else who is concerned about women’s rights, they responded,” she said, adding that Karzai had a track record of supporting women. “In the past you have seen that the president is someone who has made sure women’s rights are protected according to the laws of the country.”

Whatever his personal views, Karzai has presided over a strengthening of factions opposed to women’s rights during his latest term in office. In the last year alone parliament has blocked a law to curb violence against women and cut the quota for women on provincial councils, while the justice ministry has floated a proposal to bring back stoning as a punishment for adultery.

Activists also say the change to the law as currently planned would still leave women more vulnerable than they are now. It allows relatives to testify against each other if they wish but does not grant any legal rights to call them to the stand. An amended draft in circulation now says that relatives of the accused have a right “not to answer questions”, according to an international diplomat following the case.

Protections in most countries exempt only husbands and wives from a legal obligation to testify against each other, while the new Afghan law covers a very wide range of relatives, from a mother’s great-uncle to a brother’s grandchildren. Especially in close-knit villages, this could potentially allow dozens of key witnesses to avoid giving evidence.

“We are cautiously optimistic after hearing statements from the palace,” said Heather Barr, Afghanistan researcher at Human Rights Watch, which first raised concerns about the law. “We need to see the exact language before we can know whether it will really fix the problem.

“President Karzai’s decision today is an indication that this kind of international reaction still makes a difference, and we would beg diplomats not to sit by next time there is an attack on women’s rights, because there will be one,” she added.

However, along with the demands to protect modest gains in women’s rights since the fall of the Taliban, there is also some pressure for a fast resolution of the current standoff, because Afghanistan is in desperate need of a new criminal prosecution code.

Gulnaz, 19, was raped by a cousin but found guilty of adultery and jailed for 12 years. Her daughter was born on the floor of her prison cell.

It is hard sometimes to describe the enormous efforts taken by the Afghan political elite and conservative lawmakers to roll back hard won progress on women’s rights in Afghanistan. Here we have yet another frightening example: a new law, passed by both houses of the Afghan parliament and waiting for President Hamid Karzai’s ratification, would prohibit the questioning of relatives of an accused perpetrator of a crime, effectively eliminating victim testimony in cases of domestic violence.

In article 26 of the proposed change in the criminal prosecution code, those prohibited from testifying would include: husbands, wives, mothers, fathers, brothers, sisters, uncles, aunts and descendants of those relatives up to the second generation. Doctors and psychiatrists would also be banned from giving evidence.

This proposed law is particularly troubling in a country where violence against women is endemic and, most commonly, is at the hands of a relative. In a 2008 study, Global Rights found that 87% of Afghan women will experience some form of violence in their lifetime; 62% experience multiple forms of violence, including forced marriage and sexual violence.

Women for Afghan Women (WAW) can attest to these findings. Over 90% of the nearly 10,000 women and girls we have served since 2007 have been victims of domestic violence. Our clients have been raped, sold, beaten, starved and mutilated – primarily at the hands of a family member, or in some cases, multiple family members.

Should Karzai sign this law into effect, justice for these women would be virtually impossible. Not only would they be barred from testifying against family members who committed crimes against them, any family member who witnessed the crime would be barred as well.

Under the proposals, WAW clients, such as 15-year-old Sahar Gul who was kept in a basement and tortured by her in-laws, would have been robbed, not only of justice, but of the opportunity to reclaim her power and testify against her tormentors. Furthermore, the doctors who treated her bloodied, malnourished, and burned body would also be barred from testifying. Sahar Gul’s in-laws are serving a five-year prison sentence for torturing her. Had the new measure been law in 2012, her in-laws would likely be free to torture and abuse more women.

Other clients, such as 16-year-old Naziba who was raped by her father, would be left with no other option but to live with the abuse. At Naziba’s rape trial, her mother and uncles courageously testified against her father, and he is now serving a 12-year prison sentence. If Naziba’s relatives had been barred from testifying on her behalf, Naziba’s father might still be raping her today.

The timing of this proposed change to the law is important: a recent report by UN Women found that reported cases of violence against women was up 28% in the past year. This finding is significant because it illustrates that Afghan women are beginning to understand their rights and demand access to them.

Since 2007, our organisation has worked hard to build coalitions with local police departments, government ministries and court officials. As a result of our advocacy, these agencies are referring more and more victims to our services, instead of sending them back home or imprisoning them for running away. In some provinces, such as Kabul, the police are our biggest ally – they refer more women than any other agency. This gives us hope, illustrating that there has been a shift in attitude and perception about violence against women, not only among Afghan women, but at an institutional level as well.

However, should Karzai ratify this law, I fear that women would stop coming forward because prosecutions would be nearly impossible to secure. As an organisation that has been working tirelessly to obtain justice for women and girls who have suffered so much and so needlessly, our hands would be tied. There would be little we could do.

We, along with other human rights activists, refuse to stand back and allow this to happen. The stakes are too high and the consequences too horrific to imagine.

Browsing today’s edition of Crikey just now I came across a little piece from Guy Rundle on Afghanistan. This paragraph stood out:

The plain fact is that any eight year war in a foreign land has become a war against the people, a little Vietnam. Guerrilla insurgency is about moving like a fish in the water of the wider populace — thus obliging the occupying power to drain the pond (or, in the words of one of Melbourne’s addled pro-war Maoists — burnouts getting their jaded jollies from righteous killing, as usual — “draining the swamps where terror breeds”).

He’s clearly referring to an article by me which was published in The Australian, back in 2006: Drain the Swamps where Terror Breeds. (It’s sort of nice to know that he still feels irritated by it….)

Interestingly Rundle is on the record with an appalling call for a bloodbath in Iraq. These are his words just before the war began in 2003:

`…it may be best in the long run if Baghdad . . . resists and there is a slaughter of some duration”