John Major said he wanted to discuss "this dreadful loss of innocent life" with other heads of state at the meeting of the G7 world economic powers.
"What we have to look at now is how we can prevent a recurrence," he said, adding that he had been in touch with French President Chirac, US President Clinton, Israeli Prime Minister Perez and Lebanese Prime Minister Harare.
He said he thought a solution was "possible and I don't think we are a long way away from such an agreement".
He refused to take sides in the argument about responsibility for the start of the crisis in south Lebanon.
"Everyone can look back at the Hizbollah attacks in Israel and the Israeli attacks in the Lebanon. That is non-productive. What is productive is to make sure it doesn't happen again," he said.
In the Commons, Michael Heseltine, the Deputy Prime Minister, also trod a careful line supporting the Israeli government without endorsing its attempts to punish Hizbollah guerillas in south Lebanon. He told MPs that, looking at the issues involved in "the attacks that Hizbollah have been making on Israel ... it is quite apparent that one is facing a near- intractable problem of the deepest concern to the international community."
He was pressed by Labour backbench critics of Israel, including George Galloway (Glasgow Hillhead), who condemned the Israeli attack as a "reckless orgy of violence".
Mr Heseltine said he had personally seen Fijian troops - who sustained many of yesterday's casualties - serving for the UN. "They are an immensely impressive force and they do a wholly desirable task on behalf of the wider world," he said.
Malcolm Rifkind, the Foreign Secretary, said he was "gravely concerned" at the shelling.
At Westminster, MPs divided along pro-and anti-Israel lines. Emma Nicholson, the former Tory MP who crossed to the Liberal Democrats, said the attack was "utterly unbelievable". She said: "The Israelis must stop. They are losing sympathy fast, but much more importantly they are harming and hurting countless civilians and killing even children."Reuse content