Tony Blair has described the war in Iraq as a "test case" for the handling of countries which possess weapons of mass destruction (WMD).
He said if Britain had backed down from dealing with Iraq, it would have been unable to deal with other rogue states.
The prime minister was speaking to reporters while on his way back from Iraq after a surprise visit to Basra.
He told UK troops there they fought for a "noble cause" toppling Saddam Hussein and normality was slowly returning.
But he also later warned the next six months in Iraq would be difficult, in the run-up to the handover of power to the Iraqis in July.
Mr Blair's trip lasted less than 24 hours, and his plane landed at Heathrow airport on Sunday evening.
On the journey home, he told journalists he wanted to send out the message there were other ways of dealing with WMD.
"I believe as strongly as I ever have this is the security threat and if we don't deal with it we will rue the day we didn't," he said.
He did not mention any countries by name but is understood to have been referring to Iran and North Korea, whose nuclear ambitions continue to cause international tension.
The comments echo the prime minister's New Year message, in which he said the decision by Libya to dismantle its weapons of mass destruction showed the fruits of "discussion and engagement".
'Win the peace'
Speaking to the troops earlier, Mr Blair reiterated his personal belief in the necessity of the war.
He said: "The conflict here was a conflict of enormous importance because Iraq was a
Iraq had a proven record, he said, of not just developing but using weapons of
mass destruction and repressing its own people.
"If we had backed away from that, we would never have been able to confront
this threat in the other countries where it exists."
He thanked British servicemen and women - "the new pioneers of soldiering" - for their part in winning last year's conflict, but told them they now had to "win the peace".
The Daily Telegraph says Mr Blair told military commanders in Basra that the 10,000 British troops stationed in the country would not be scaled down until next year.
Mr Blair was cautious about the prospects of rapid progress in dealing with insurgency in Iraq, saying that getting on top of the security situation by July would be difficult.
Asked by reporters if he still believed WMD would be found in Iraq, Mr Blair said: "The first thing is to wait for the Iraq Survey Group
"I don't believe that the intelligence we got was wrong.
The prime minister flew to Basra on a military jet from the Egyptian resort of Sharm-el-Sheik, where he spent the Christmas break with his family.
During his visit, he met US civilian administrator Paul Bremer and his deputy, Sir Jeremy Greenstock, Britain's top diplomat in Iraq.