Tony Blair has warned that an "arc of extremism" is stretching across the Middle East and said "an alliance of moderation" was needed to defeat it.
Mr Blair also told the World Affairs Council in Los Angeles that Syria and Iran had to stop supporting terrorism or they would "be confronted".
His speech was planned some weeks ago but he said the Lebanon crisis had "brought it into sharp relief".
He said there was now a war "of a completely unconventional kind".
The prime minister said: "There is an arc of extremism now stretching across the Middle East and touching countries far outside that region."
He said in Iraq, Syria had allowed al-Qaeda operatives to "cross the border" while Iran had supported extremist Shia.
"The purpose of the terrorism in Iraq is absolutely simple - carnage, causing sectarian hatred, leading to civil war," he said.
'Export of instability'
Mr Blair added: "We need to make clear to Syria and Iran that there is a choice: come in to the international community and play by the same rules as the rest of us; or be confronted.
"Their support of terrorism, their deliberate export of instability, their desire to see wrecked the democratic prospect in Iraq, is utterly unjustifiable, dangerous and wrong.
"If they keep raising the stakes, they will find they have miscalculated."
Mr Blair also spoke about the conflict between Israel and Lebanon and said that the "purpose of the provocation" that began it "was clear".
"It was to create chaos, division and bloodshed, to provoke retaliation by Israel that would lead to Arab and Muslim opinion being inflamed, not against those who started the aggression but against those who responded to it," he said.
However, he said it was still possible to come out of the crisis "with a better long-term prospect for the cause of moderation in the Middle East succeeding".
He added: "But it would be absurd not to face up to the immediate damage to that cause which has been done."
Mr Blair said all would be done to try to halt the hostilities in the conflict.
"But once that has happened we must commit ourselves to a complete renaissance of our strategy to defeat those that threaten us," he said.
'Alliance of moderation'
Mr Blair spoke of how he believed "global extremism" should be tackled.
"To defeat it will need an alliance of moderation that paints a different future in which Muslim, Jew and Christian, Arab and Western, wealthy and developing nations can make progress in peace and harmony.
"We will not win the battle against this global extremism unless we win it at the level of values as much as force, unless we show we are even-handed, fair and just in our application of those values to the world."
He said this "unconventional" war must be won through these values.
"This war can't be won in a conventional way, it can only be won by showing that our values are stronger, better and more just, more fair than the alternatives," he said.
However, he said this required a dramatic change in strategy.
The prime minister told his 2,000-strong audience there was now an "elemental struggle" about values that was set to shape the world's future.
He said it was a part of struggle between what he called reactionary Islam and moderate mainstream Islam.
And in Iraq and Afghanistan he said "the banner was not actually regime change it was values change".
"What we have done therefore in intervening in this way, is probably far more momentous than we appreciated at the time," he said