Tony Blair has said the G8 summit offers the hope which can lift the darkness of terrorism.
Mr Blair thanked other leaders for their solidarity
Flanked by all the leaders at the G8 summit, Mr Blair said their deal did not have the ghastly impact of terror.
"But it has a pride and a hope and a humanity at its heart that can lift the shadow of terrorism and lead the way to a better future," he said.
Mr Blair later returned to Downing Street to chair the government's emergencies committee, Cobra.
In London, Mayor Ken Livingstone said the emergency services' response to the attacks had been "flawless".
Mr Livingstone said a book of condolence would open at City Hall on Monday and a relief fund would be started for those killed and injured.
"I myself will use the Underground to go to work on Monday, as normal, and that is the advice I give to every Londoner," said Mr Livingstone at a news conference.
He said he did not think Iraq had raised the threat of attacks.
"In any great city will be a target for terrorism because they want the oxygen of publicity", he said.
Speaking in Gleneagles, Mr Blair said the G8 had made "real and achievable" progress on Africa, climate change and Middle East peace.
He said: "The purpose of terrorism is not only to kill and maim the innocent, it is to put despair and anger in people's hearts.
"It is by its savagery designed to cover all conventional politics in darkness, to overwhelm the dignity of democracy and proper process with the impact of bloodshed and of terror.
"There is no hope in terrorism, nor any future in it worth living. And it is hope that is the alternative to this hatred."
In contrast to the destruction of the attacks on London, the G8 summit had agreed a $3bn aid package for the Palestinian Authority to help it live peacefully alongside Israel, said Mr Blair.
Despite disagreements on global warming, there would be new talks between G8 countries and emerging nations to slow down and in time reverse the rise in greenhouse gas emissions, he said.
And there were deals on aid and trade for Africa which were progress and if delivered would "make poverty history", although they were not everything that everybody wanted.
The Make Poverty History campaign says some important steps have been taken but more action is urgently needed.
Mr Blair said: "The politics we represent will win and will triumph over terrorism."
At a news conference, the prime minister was asked what had gone wrong to allow the bombings in London.
He replied: "These people who kill the innocent and cause such bloodshed, they are responsible and they are solely responsible."
He thanked fellow G8 leaders for their expressions of solidarity with the UK.
Mr Blair later visited the headquarters of the London Ambulance Service to thank paramedics, control room staff and police for their work in the wake of the attacks.
The prime minister went on to Downing Street to chair Cobra, the committee which involves ministers, officials and emergency services.
Home Secretary Charles Clarke has called a special meeting of his European counterparts in Brussels next Wednesday.
The ministers are likely to discuss measures debated at previous summits, including having common rules on how long law enforcement agencies should retain telecommunications data and sharing more information on lost and stolen passports.
They may also discuss moves to encourage EU states to share anti-terrorism information through Interpol and Europol.
Members of Europol on Friday joined British investigators in London to help collate information about the bombings.