Former finance minister Jim Flaherty has died at the age of 64.

Flaherty, one of Canada's longest-serving finance ministers, resigned from cabinet in March. He had been Prime Minister Stephen Harper's only finance minister since the Conservatives were elected to power in 2006.

Ottawa police confirmed Flaherty died of a heart attack early Thursday afternoon.

Flaherty and his wife, Ontario MPP Christine Elliott, have 22-year-old triplet sons — John, Galen, and Quinn.

The family released a statement Thursday afternoon saying Flaherty "passed away peacefully in Ottawa."

"We appreciate he was so well-supported in public life by Canadians from coast to coast to coast and by his international colleagues," it read.

Harper addressed his caucus later in the afternoon, calling Flaherty's passing "an unexpected and terrible shock to Jim's family, to our caucus, to Laureen and me."

The prime minister called Flaherty a partner and friend.

"It is with the heaviest of hearts that I offer my family's condolences," he said. "Christine, Quinn, Galen and John, you're in all of our thoughts and prayers."

The Ottawa Citizen reported that Labour Minister Kellie Leitch, a medical doctor, administered CPR to Flaherty before paramedics arrived at his condo.

Leitch and Flaherty lived in the same building, and she credited the former finance minister for encouraging her to enter politics. She was visibly upset during Harper's press conference about Flaherty's death.

NDP Leader Thomas Mulcair fought back tears while addressing reporters.

"Catherine and I want to express to Christine Elliott our profound sadness at the departure of our friend Jim Flaherty. All his colleagues in the House of Commons share in that loss," Mulcair said.

"Jim Flaherty was an extraordinary, dedicated public servant. He will be greatly missed by all of us."

In a statement, Liberal Leader Justin Trudeau said Flaherty was a dedicated Parliamentarian with "a strong social conscience" who was committed to the ideal of public service.

"He was a proud Canadian and showed continued devotion and commitment to his country over many years," Trudeau said in the statement. "This is a loss to the entire family in the House of Commons."

Flaherty, who represented the Ontario riding of Whitby-Oshawa since 2006 after a long career in Ontario politics, had been struggling with a rare skin condition — bullous pemphigoid. The condition was not thought to be life-threatening.

When he stepped down on March 18, Flaherty said in a statement his health issues were not the reason for his resignation.

"I am happy to report that I am on the road to a full recovery and the decision to leave politics was not related in any way to my health," he said in a statement. "This decision was made because it is the right one for me and my family at this time."

The House of Commons abruptly suspended its sitting before question period began. The Peace Tower flag was lowered to haf-mast in his honour. The Ontario legislature, where Flaherty sat for a decade, also held a moment's silence for him and recessed.

Politicians of all stripes took to Twitter Thursday afternoon to share condolences.

With files from The Canadian Press

Also on HuffPost:

Loading Slideshow...
  • Jim Flaherty with his wife(left) after giving his speech at the Provincial Progressive Conservative Party Leadership Convention, held at the Metro Toronto Convention Centre. Mar. 22, 2002 Photo by Louie Palu/The Globe and Mail

  • Jim Flaherty posing with the Stanley Cup while on the campaign trail for the provincial PC leadership at the Hockey Hall of Fame. Feb. 26, 2002 Photo by Louie Palu/The Globe and Mail

  • Ontario Progressive Conservative leadership candidate, Jim Flaherty, on Feb. 27, 2002 Photo by Tibor Kolley / The Globe and Mail

  • At the Ontario Progressive Conservative Leadership debate, Chris Stockwell looks on as Jim Flaherty, left, gets some last minute touch-up to his make-up. Picture taken on Feb.27, 2002. Photo by Tibor Kolley

  • Jim Flaherty becomes new Ontario finance minister, after Ernie Eves resigned from the post. New cabinet members were sworn in today, February 8, 2001, at Queen's Park. Photo by Patti Gower / The Globe and Mail.

  • Jim Flaherty becomes new Ontario finance minister, after Ernie Eves resigned from the post. New cabinet members were sworn in today, February 8, 2001, at Queen's Park. Photo by Patti Gower / The Globe and Mail.

  • Sunday. Mar.18/07. Federal Finance Minister Jim Flaherty will deliver the budget in Ottawa tomorrow.During a pre-budget photo op, he purchased a pair of Canadian-made skates for his son John (16) at Blades Custom Skate Care Inc. in Whitby, Ont. The skates are CCM Reebok 9K pump skates. The total price including all taxes was $456.00. Before the photo op he was scrummed by the media. Pictures taken on Mar.15/ 2007 Photo by Tibor Kolley

  • Canadian Finance minister Jim Flaherty smiles as he takes part in a conference during a meeting of the Group of eight (G8) Finance in Lecce on June 12, 2009. World powers launched a project on the sidelines of G8 talks to develop vaccines against pneumococcal diseases as part of a new market-based mechanism for the developing world. AFP PHOTO / ALBERTO PIZZOLI (Photo credit should read ALBERTO PIZZOLI/AFP/Getty Images)

  • Finance Minister Jim Flaherty tables the federal budget in the House of Commons on Parliament Hill in Ottawa Thursday March 4, 2010. THE CANADIAN PRESS/Adrian Wyld

  • Canadian Finance Minister Jim Flaherty shows a green shoe as he shops in Ottawa on March 28, 2012 for a new pair of shoes as part of the tradition of budget day. The tradition holds that Ministers of Finance purchase or wear new shoes when the budget is delivered. AFP PHOTO/ROGERIO BARBOSA (Photo credit should read ROGERIO BARBOSA/AFP/Getty Images)

  • Canada's Finance Minister Jim Flaherty successfully exits an igloo outside the Nunavut legislature in Iqaluit, Canada during a break in proceedings at the G7 Finance Ministers Meeting, February 6, 2010. Moments earlier Minister Flaherty dislodged a large piece of snow from the entry way of another smaller igloo as he attempted to exit. AFP PHOTO/ GEOFF ROBINS (Photo credit should read GEOFF ROBINS/AFP/Getty Images)

  • Federal Finance Minister Jim Flaherty speaks to reporters at the Port of Montreal, Monday, September 27, 2010. Flaherty insists the government will be "fair and reasonable" in assisting stimulus projects that are supposed to be complete by the end of March. THE CANADIAN PRESS/Ryan Remiorz

  • Hanoi, VIET NAM: Canadian Finance Minister Jim Flaherty (R) meets with his Vietnamese counterpart Vu Van Ninh during a bilateral meeting on the sidelines of the APEC finances ministers' meeting held in Hanoi 07 September 2006. Pacific Rim finance ministers will this week push for renewed talks to free up global trade and pledge steps against terrorist financing, according to a draft of a joint statement. AFP PHOTO/HOANG DINH Nam AFP PHOTO/HOANG DINH Nam (Photo credit should read HOANG DINH NAM/AFP/Getty Images)

  • France's Minister of the Economy, Industry and Employment Christine Lagarde (L), Canada's Minister of Finance, Jim Flaherty (C) and US Treasury Secretary Timothy Geithner attend the final press conference for the G7 Finance Ministers Meeting in Iqaluit, Canada, February 6, 2010. AFP PHOTO/ GEOFF ROBINS (Photo credit should read GEOFF ROBINS/AFP/Getty Images)

  • From left: Canadian Finance Minister Jim Flaherty and British Chancellor of the Exchequer Alistair Darling watch as US President George W. Bush delivers a statement with G7 finance ministers and heads of international financial institutions October 11, 2008 in the Rose Garden of the White House in Washington, DC. AFP PHOTO/Mandel NGAN (Photo credit should read MANDEL NGAN/AFP/Getty Images)

  • Minister of Finance Jim Flaherty poses for a photo following an interview in Ottawa on Monday, Dec. 21, 2009. THE CANADIAN PRESS/Pawel Dwulit

  • Minister of Finance Jim Flaherty and Prime Minister Stephen Harper enter the House of Commons on budget day on Parliament Hill in Ottawa on Tuesday, February 11, 2014. THE CANADIAN PRESS/Patrick Doyle

  • Finance Minister Jim Flaherty appears during a news conference at the House of Commons on Parliament Hill in Ottawa, Ontario, on Monday, May 14, 2012. (AP Photo/The Canadian Press, Sean Kilpatrick)

  • Finance Minister Jim Flaherty holds the last penny struck in Canada at the Royal Canadian Mint in Winnipeg, Manitoba, Friday, May 4, 2012. Flaherty announced in the March budget that the coin would no longer be produced because the cost of making it is more than it's worth. He has estimated that the government will save $11 million a year. Ian Bennett, president and CEO of the Royal Canadian Mint, smiles at left. (AP Photo/The Canadian Press, John Woods)

  • Finance Minister Jim Flaherty holds the last penny struck in Canada at the Royal Canadian Mint in Winnipeg, Manitoba, Friday, May 4, 2012. Flaherty announced in the March budget that the coin would no longer be produced because the cost of making it is more than it's worth. He has estimated that the government will save $11 million a year. (AP Photo/The Canadian Press, John Woods)

  • Canadian Finance Minister Jim Flaherty arrives for a G-20 dinner, during the Spring Meetings of the World Bank Group and the International Monetary Fund Thursday, April 18, 2013 in Washington. (AP Photo/Alex Brandon)

  • Finance Minister Jim Flaherty, left, and Toronto Mayor Rob Ford, right look on as Prime Minister Stephen Harper announces funding for new subways in Toronto, Sunday, September 22, 2013. THE CANADIAN PRESS/Mark Blinch

  • A emotional Minister of Finance Jim Flaherty listens to a speaker during an announcement in Ottawa, ON Friday October 21, 2011. (CP)

  • Minister of Finance Jim Flaherty responds to a question during question period in the House of Commons on Parliament Hill in Ottawa on Monday, March 3, 2014. THE CANADIAN PRESS/Sean Kilpatrick

  • The photo from the last tweet from Jim Flaherty's account.