Former Foreign Secretary Robin Cook was hailed as "the greatest parliamentarian of our times" when political leaders joined family and friends at his funeral yesterday.

The description came from Chancellor Gordon Brown, who said Mr Cook's parliamentary career had been "a 30-year-long master class in effective eloquence that gave people a new faith in democracy itself".

Mr Brown was among several speakers at the funeral service attended by 750 mourners at St Giles' Cathedral, in Edinburgh.

The most controversial was Channel 4 racing pundit John McCririck, a long-standing friend of Mr Cook.

In a stinging attack from the cathedral's pulpit, McCririck berated Prime Minister Tony Blair for not being present.

Mr Blair is on holiday and Downing Street has said he will attend a memorial service being organised by the Labour Party.

McCririck, wearing a purple suit, praised the "impressive" attendance by those wishing to pay their respects to Mr Cook and his family.

"There is just one exception to that, and that is the nation's leader, the Prime Minister," said the racing pundit.

He went on: "Margaret Thatcher, of course she attended Ted Heath's service.

"I believe the Prime Minister's snub to Robin's family, to millions of New Labour voters, demonstrates a petty vindictiveness and a moral failure - opting to continue snorkelling instead of doing his duty.

"What a contrast to Lady Thatcher."

Outside the cathedral, where the service was relayed by loudspeaker, his remarks were applauded by many bystanders.

Inside, mourners stirred in their seats and a frisson ran through the cathedral.

After the service, Northern Ireland Secretary Peter Hain said the remarks had been inappropriate.

"I thought it was very out of place," he said.

Labour peer and former minister Lord Foulkes said: "It was a pity it was spoiled by John McCririck.

"What he said was inappropriate for a funeral service."

Among the mourners were Mr Cook's former wife Margaret and widow Gaynor, and his two sons Peter and Christopher.

Margaret arrived with her partner, Robin Howie, almost un-noticed 80 minutes before the service.

Gaynor, looking drawn and pale but holding her head high, arrived moments before the start with Mr Cook's two sons.

More than half the Cabinet were there, including John Prescott, Jack Straw, John Reid and David Blunkett.

Former Labour leaders Michael Foot and Lord Kinnock attended, as did Charles Kennedy for the Liberal Democrats, Alex Salmond for the SNP, and Sir Malcolm Rifkind for the Tories, along with Scottish Tory leader David McLetchie.

Richard Holloway, the Scottish Episcopal Church's former bishop of Edinburgh, told how Mr Cook had sent his son, Christopher, a text message an hour before his death from Ben Stack, the mountain where he suffered a heart attack last Saturday.

It read: "Am on Ben Stack. View of Arkle and Foinaven can't be seen for mist. Weather foul. Wish you were here."

The bishop told mourners: "He was on the rooftop of Scotland with the woman he adored.

"He was thinking of the son he loved with all his heart.

"He was making a joke about the Scottish weather, and Arkle and Foinaven are peaks after which two famous steeplechasers were named.

"Robin was always able to pack a lot into a few words."

The main tribute to Mr Cook came from Gordon Brown, who declared: "The greatest parliamentarian of our times put all his talents and his life at the service of the greatest causes of our times - to right wrongs, to equalise life chances, and to advance opportunity."