Former Canadian 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 yesterday 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 Mr 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, 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," Mr Harper said.

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

The smaller G7 major economies said in a statement that their members "were greatly saddened" by Mr Flaherty's passing.

Minister for Finance Michael Noonan also said he was greatly saddened at the news of the death. He said he and Mr Flaherty had worked closely together in the IMF and World Bank, where Ireland and Canada share a constituency.

"I know the Irish community in Canada will also be deeply saddened at the loss of one of their greatest friends.

Jim Flaherty was forever accessible to the Irish Government and the Irish community and constantly championed the promotion of Irish related projects in Canada," the minister said in statement.

Mr 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 was replaced on 19 March by former natural resources minister Joe Oliver.

Mr Flaherty had planned to take some time off after the gruelling schedule required of a G7 finance ministers and was expected to eventually take a role in the private sector.

Mark Carney, the Bank of England chief who worked closely with Mr Flaherty for a decade at the Canadian finance ministry and later at the central bank, said Mr 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.