LONDON — Prime Minister Gordon Brown warned Afghanistan's government on Friday to take action against corruption, saying he would not risk more British lives there unless it reforms.

Brown said in a speech that success in Afghanistan is vital to Britain's security — but declared that if the Afghan government does not mend its ways it will forfeit the world's support.

"I am not prepared to put the lives of British men and women in harm's way for a government that does not stand up against corruption," he said.

The speech comes after the deaths of seven British soldiers in the past week, including five who were shot by an Afghan police officer they were training. Corruption-marred presidential elections and rising casualties have undermined British support for the war.

U.K. commitment depends on KarzaiBrown said the government in Afghanistan had become a by-word for corruption, but that newly re-elected Afghan President Hamid Karzai had assured him that he would take decisive action against it.

Britain has promised to send 500 more troops to Afghanistan — though Brown said it was dependent upon progress in governance.

Despite increasing doubt over the country's involvement in the war in Afghanistan, Brown linked military action there to safety on Britain's streets.

"We will not be deterred, dissuaded or diverted from taking whatever measures are necessary to protect our security," Brown said.

Warning for Afghan governmentBritain currently has about 9,000 troops in the country, the majority in the restive southern Helmand province. The force is the second-largest foreign one in the country after the United States.

Brown said Karzai "needs a contract with the Afghan people; a contract against which Afghans, as well as the international community, can judge his success."

"International support depends on the scale of his ambition and the degree of his achievement in five key areas: security, governance, reconciliation, economic development, and engagement with Afghanistan's neighbors," Brown said.

"If the government fails to meet these five tests, it will have not only failed its own people, it will have forfeited its right to international support."