Gordon Brown: "Cronies and warlords have no place in the future of Afghanistan"
Gordon Brown has told Afghan President Hamid Karzai he will not put UK troops "in harm's way for a government that does not stand up against corruption".
In a speech, Mr Brown said the UK "cannot, must not and will not walk away" from its mission in Afghanistan.
But he said continued coalition support would depend on the delivery of reform.
The Tories accused Mr Brown of sending "mixed messages" on Afghanistan - and the Lib Dems called for a complete rethink of the international strategy.
'Byword for corruption'
Former chief of the defence staff Lord Guthrie launched a strong attack on the government's policy in Afghanistan, saying there was clear need for more helicopters. He also criticised "dithering" in London over promised extra troops.
In his speech, Mr Brown said that as long as Al-Qaeda continued to plot attacks on Britain from the region, "we cannot, must not and will not walk away".
Our support for this mission in Afghanistan, of course, is not unconditional
And he stressed his commitment to Britain's mission in Afghanistan, saying: "We will not be deterred, dissuaded or diverted from taking whatever measures are necessary to protect our security."
But he also launched his strongest criticism yet of the Afghan government, saying it had become a "byword for corruption".
And he called for the creation of a new commission to investigate abuses, warning President Karzai that "cronies and warlords should have no place in the future of Afghanistan".
The UK prime minister said Mr Karzai had pledged to make fighting corruption his top priority. He said he hoped the Afghan president would use his inauguration speech on 19 November to set out detailed plans to combat corruption, build up his security forces and improve the governance of his country.
And he set out a series of tests he said President Karzai's government had to pass to ensure continued international backing.
"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 its neighbours," said Mr Brown.
"If, with our help, the new government of Afghanistan meets these five tests, it will have fulfilled an essential contract with its own people. And it will have earned the continuing support of the international community, despite the continuing sacrifice.
"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."
Caroline Wyatt, BBC defence correspondent
In a phrase that may dismay military commanders, the Prime Minister said of the international coalition that "in the end we will succeed or fail together". Talk of failure is not something commanders or troops on the ground want to hear.
Mr Brown called for an "inclusive" political settlement in Afghanistan after the recent heavily criticised election and said that all those who rejected violence must be embraced as part of a process of reconciliation.
Stressing the importance of holding the international coalition together, Mr Brown said: "We will succeed or fail together and we will succeed."
His comments came after five soldiers were killed in Helmand on Tuesday by a police officer who was being trained by UK forces.
Mr Brown said the UK's mentoring programme would continue "because it is what distinguishes a liberating army from an army of occupation".
He said the UK's role in Afghanistan could not be undertaken without "risk or danger" and paid tribute to the sacrifice of British troops, saying they were "a defining feature" of the British nation.
Andrew North BBC correspondent in Kabul After a particularly bad week for British troops here, Gordon Brown is keen to switch the pressure on to President Hamid Karzai. It's part of a concerted international effort to force him to change his ways in his next five-year term. But by saying he's not prepared to put British troops "in harm's way" if the Afghan government "doesn't stand up against corruption", the prime minister might have set himself up for more trouble over his strategy. It will be an uphill struggle tackling corruption while Afghanistan remains so poor and unstable, and when it's so politically difficult for President Karzai to sack suspect officials. Some may say this could provide the justification Britain needs to pull out. But Gordon Brown again said "we cannot, must not and will not walk away".
Mr Brown reiterated his belief that the main terrorist threat to the UK continues to emanate from Afghanistan and Pakistan, saying anyone who questioned why UK troops were in Afghanistan should reflect on the terrorist atrocities since 2001.
His speech comes amid growing unease at Westminster about the situation in Afghanistan, with a handful of Labour MPs calling for a phased withdrawal of British troops.
Shadow defence secretary Liam Fox accused Gordon Brown of confusing military goals with governance and human rights issues which although "linked" were "different".
"He was right to say you cannot walk away - and if you cannot walk away that's it", Mr Fox told the BBC News Channel.
"We want to see the Karzai government dealing with corruption but remember where the Karzai government is... corruption is endemic in that part of the world. It will take a long time for people to turn round how they carry out their affairs."
He added: "I think we have to be very clear about what it is we are trying to achieve and not mix the messages."
The Liberal Democrats have refused to rule out calling for the withdrawal of British troops before the next election if they are not convinced a strategy is in place to ensure success in Afghanistan.
Party leader Nick Clegg said he would wait for the Obama administration to unveil its future approach on strategy and troop numbers before deciding.
"Our support for this mission in Afghanistan, of course, is not unconditional," he told the BBC.
"When you are putting young men and women in harm's way and they are getting injured and killed in increasingly large numbers, it would be absurd to say that one continues to support that, come whatever circumstance.
"If the circumstances arise that we feel there is not a proper new strategy in place which allows British soldiers to return to the UK with their heads held high feeling that they have succeeded in their mission, of course, major questions need to be asked."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.