OTTAWA, April 10 (Reuters) - Former Finance Minister Jim Flaherty, who steered Canada through the global financial crisis and then nearly eliminated the huge budget deficits he had run up in the process, died on Thursday just weeks after resigning.

His family said he passed away peacefully in Ottawa, but did not give a cause of death. An unnamed source close to the family told CBC television that Flaherty had suffered a massive heart attack. He was 64.

Canada's federal and provincial legislatures, where Flaherty had served, suspended their sessions. The flag flew at half-mast over Parliament in the capital, Ottawa.

"Today is a very sad day for me, for our government and for all of our country," Prime Minister Stephen Harper, his voice quaking, said of the friend who had stood at his side since the Conservatives took power in 2006.

"Jim will be sorely missed, not only by his friends on both sides of the House ... but he will also be missed by the countless thousands of Canadians that he devoted himself to and whom he helped during his long and successful career in public life."

Finance ministers and central bank chiefs from the Group of 20 leading economies started their meeting in Washington by paying tribute to Flaherty, an outspoken member of the group who was not shy about criticizing policies if he disagreed with them.

The smaller Group of Seven major economies said in a statement that their members "were greatly saddened" by Flaherty's passing. Flaherty was the doyen of the G7 when he stepped down.

Federal opposition New Democratic Party leader Thomas Mulcair choked back tears as he told reporters outside the House of Commons: "Jim Flaherty was an extremely dedicated public servant, and he will greatly missed by all of us."

Flaherty had been suffering acutely from a rare skin disease, but at the time of his resignation in March, he said that his decision had nothing to do with his health.

SOUND BUDGETS AND COMPASSION

Flaherty was Canada's third-longest-serving finance minister. A tax-cutting Conservative, he left the government on track to balance its books by 2015 after running up the largest deficit in history in nominal terms in the fight against the 2008-09 recession.

He also intervened several times to cool Canada's booming housing market, hoping to avoid a bubble that could burst and provoke another recession.

"He's remembered as one of the longer serving - and, I would argue, one of the better - finance ministers we've had," said Royal Bank of Canada chief economist Craig Wright. "He had a very important portfolio through very uncertain times, and I think, with the clarity of hindsight, he did a phenomenal job in managing it."

The father of triplets, one of whom is disabled, Flaherty also ushered in tax-sheltered Registered Disability Savings Plans for those with disabilities.

He was replaced on March 19 by then-Natural Resources Minister Joe Oliver, who is currently in Washington.

Flaherty had planned to take some time off after the grueling schedule required of a Group of Seven finance minister, and was expected to eventually take a role in the private sector.

Flaherty had also stood by family friend, Toronto Mayor Rob Ford, long after many politicians had deserted Ford after he admitted smoking crack.

Australian Finance Mininster and G20 Chair Joe Hockey kicked off the G20 meeting by announcing Flaherty's death and calling on Canadian policymakers to say a few words.

It was an unexpected G20 debut for Oliver, less than a month in his new role, as he eulogized his predecessor and described him as "the guiding force of 10 federal budgets" and one of Canada's great statesmen.

Mark Carney, the Bank of England chief who worked closely with Flaherty for a decade at the Canadian finance ministry and later at the central bank, said Flaherty had an enormous influence on him personally and globally when the G20 rose to prominence in 2008 and at other key moments of the financial crisis in 2009 and 2010.

"This is a man who was a true believer in multilateralism. They way he went about it was direct. He led, he cajoled, he urged members around the table to pursue the right policies ... he wouldn't settle for anything less," Carney said.

"I know a number of us will miss him. I will miss him tremendously."

Stephen Poloz, whom Flaherty appointed as governor of the Bank of Canada, said Flaherty left "an important legacy of fiscal responsibility and public service, and I admired him greatly." (Additional reporting by Leah Schnurr and Cameron French in Toronto, Louise Egan in Washington; Editing by G Crosse, Jeffrey Hodgson, Mohammad Zargham, Peter Galloway and Jan Paschal)

We welcome comments that advance the story through relevant opinion, anecdotes, links and data. If you see a comment that you believe is irrelevant or inappropriate, you can flag it to our editors by using the report abuse links. Views expressed in the comments do not represent those of the Thomson Reuters Foundation. For more information see our Acceptable Use Policy.