Racing pundit John McCririck has accused Tony Blair of snubbing Robin Cook's family by failing to break his holiday for the ex-minister's funeral.
Mr McCririck mounted the attack in a tribute at his friend's funeral, saying Mr Blair's absence was a "moral failure" and showed vindictiveness.
Cabinet minister Peter Hain said he thought the attack was very out of place and resented by other mourners.
No 10 says Mr Blair will attend a memorial service to be held later.
A spokeswoman said many others would attend that service to remember Mr Cook. She declined to comment on Mr McCririck's criticisms.
Chancellor Gordon Brown gave a eulogy to Mr Cook at the service at St Giles Cathedral in Edinburgh.
John Prescott, Alistair Darling, Jack Straw, David Blunkett and Mr Hain were among other Cabinet ministers at the service, as were Liberal Democrat leader Charles Kennedy and SNP leader Alex Salmond.
In his tribute, Mr McCririck described Mr Cook's passion for horse racing and his abilities as a tipster.
But he went on to make fierce criticisms of Mr Blair.
"What an impressive attendance we've all got. All of us have changed our plans to show our respect and affection for Robin and for Gaynor and the boys and the family," he said.
"But there is just one exception to that - and that's the nation's leader, the prime minister.
"Now 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 with Lady Thatcher."
The comments were broadcast on a loudspeaker outside the cathedral, where they prompted applause from onlookers on Edinburgh's Royal Mile.
Other ministers have said Mr Cook remained on good terms with the prime minister despite his resignation over the Iraq war.
Outside the cathedral, Mr Hain said a "wave of resentment swept through the cathedral" after Mr McCririck's comments.
The remarks were "totally uncalled for" and were "out of tune" with the mood of the ceremony, Mr Hain said, adding: "I do think most of the mourners share that view."
Labour peer Lord Foulkes said: "I just think it was a pity it was spoiled by John McCririck.
"What he said was inappropriate for a funeral service.
"He was also wrong in what he said. Tony Blair will lead tributes to Robin Cook in London which will be an even bigger occasion than this."
In his eulogy, Mr Brown saluted his former Cabinet colleague as the "most accomplished parliamentarian of his generation".
"His mission and his achievement was not just to make great speeches but to advance great causes - and he did...
"Whenever there was injustice he sought to right it, wherever there was poverty he fought a war against it."
Mr Cook's son Chris reminded the mourners of his father's commitment to Parliament.
He read a passage from his father's memoir about the need for Parliament to modernise.