Afghanistan is to review legislation which the UN says would legalise rape within marriage after a dramatic reversal from the president, Hamid Karzai, who signed the rules into law last month.

Karzai has bowed to intense international pressure to scrap the law, described by the UN human rights chief in Afghanistan as "reminiscent of the decrees made by the Taliban regime".

It is said to forbid women to refuse to have sex with their husbands and force them to get their spouses' permission before leaving the house, looking for a job, going to the doctor or receiving education.

Gordon Brown has led the international condemnation of the law, saying today it would be unacceptable for British soldiers to die defending a regime that enacted oppressive legislation of this kind. The prime minister told Sky News that Nato leaders had attacked the law in the communique issued at the end of the summit in Strasbourg, and that Karzai had told him it would not come into force in the way that it had been reported.

"I phoned the president immediately about this because anybody who looks at Afghanistan will be worried if we are going to see laws brought in that discriminate against women and put women at risk," Brown said.

"I made it absolutely clear to the president that we could not tolerate that situation. You cannot have British troops fighting, and in some cases dying, to save a democracy where that democracy is infringing human rights.

"[Karzai] responded by saying this law would not be enacted in the way it has been presented."

The Afghan president was accused of backing the law to win support from hardliners ahead of the presidential election. But a western diplomat said Karzai had been damaged by the international criticism of the legislation, which only affects members of the Shia minority, and was "looking for a face-saving way to drop it". "Given that it is election season right now plus the problems it would stir up it might be better if it could be buried," he said.

Fears have also been raised about the safety of the female parliamentarians who have spoken out on the issue. Foreign ambassadors met in Kabul today to consider a request to pay for bodyguards to protect them.

On Saturday Karzai rejected international criticism of the law, saying it had been "misinterpreted" by the west. But he promised to send it to the Ministry of Justice for review and amendment if it was found to conflict with the equal rights provisions in Afghanistan's constitution.

The final version of the law has not been published, although it was enacted in mid-March.

An analysis by the Canadian embassy in Kabul of the version that was sent by parliament to the president says the law contains a number of articles removing the rights of women. Custody of children, for example, is automatically granted to fathers and grandfathers, and provision is made for minors to marry, although a later amendment set the age of marriage to the same as Afghan civil law.

The most controversial article says that the wife is "bound to preen for her husband, as and when he desires" and "is bound to give a positive response to the sexual desire of her husband".

Defenders of the law have pointed out that the legislation was improved by the lower house of parliament, which introduced the concession allowing women to leave their homes without the permission of their husbands if they had a good reason to.

Dr Qasim Hashimzai, deputy minister of justice, said a review process had been set up that would include the United Nations and representatives from a number of diplomatic missions in Kabul, including the European Union, Canada and Holland. "We still have time to review it because the law is not yet finalised until it is printed in the official gazette. Once we get everyone around a table we can see what needs to be done." He did not give a date for when the review might be completed.