Tony Blair has vowed to fight the "new menace" of terror in a speech to his party "under the shadow" of bomb attacks in Madrid.
Tony Blair said the battle would be won
He told the Labour Party conference he would do "whatever is necessary to defend our way of life".
The speech was otherwise dominated by domestic issues, as he urged voters to be upbeat about Britain's prospects.
Mr Blair accused the Conservatives of trying to ferment "national pessimism" ahead of June's elections.
He compared the current terror threat with past battles.
"This is the new menace of our time. My father's generation were in the last
conventional war to be fought on the soil of Europe, to defeat the Nazis.
"Our generation grew up with the Cold War, that ended with the defeat of
"This generation faces a war of a different nature from anything before."
'Terrorism without limit'
Spain and Britain had known terrorism before, but Mr Blair said: "This terrorism is terrorism waged without limit, without any care for the grief of the innocent and it is terrorism designed to strike at the very heart of our way of life, our democracy, our freedom and the rule of law."
To defeat terrorism "we will do what is necessary to defend our way of life," he said.
He admitted the battle was far from over, "but like previous battles vital to the progress of humankind, this one too will be won."
Millions of people across Britain stood with the grieving Spanish "in spirit and solidarity", he went on.
Although the Madrid bombings overshadowed the conference, Mr Blair's speech also focused on energising the party ahead of June's local, European and London mayoral elections.
He urged delegates not to let the Conservatives undermine the government's domestic achievements and said he wanted all teenagers to stay in education until they were at least 18.
Mr Blair did not mention the Iraq conflict once but the Stop the War Coalition estimated 3,000 protesters took part in a demonstration outside the conference, where they called for an independent inquiry into the war.
'Fundamentally changed country'
The prime minister also praised his government's record on the NHS, employment and the economy.
He said a third Labour term was "vital" and would indicate the
country had changed fundamentally.
"Now is not the time to lose heart, to go backwards, to return to the past. It is a time of strength to carry on," he said.
He stressed values of fairness, justice and opportunity for all.
But he said Britain had "not won yet" and that "as old problems go, new ones take their place".
"Life is a perpetual struggle. That is the fate of humankind but this nation in the early 21st century. In an insecure and uncertain world, our Britain is well-placed not just to survive but to thrive."
This would spell defeat "not for a Tory political strategy, but for a Tory political philosophy". He also hit out at the
But Tory chairman Liam Fox said he was putting rhetoric above substance.
"The prime minister fails to
understand the level of disappointment and disillusionment the voters feel about
his lack of delivery," he said.
And Lib Dem chairman Matthew Taylor said: "The prime minister
clearly cannot understand that people are proud of this country but not proud of