After nearly 20 years in federal politics, Justice Minister Peter MacKay will step down this fall to focus on his "young and growing family."

With Prime Minister Stephen Harper at his side in Stellarton, N.S., MacKay announced Friday he will not seek re-election, but will stay on as justice minister and MP for Nova Scotia's Central Nova riding until October. MacKay said he does not have another job lined up, nor has he been approached with an offer.

"My love of this job and all it entails remains strong, but the love for my family is stronger," he said.

In 2012, MacKay married Iranian-Canadian human rights activist Nazanin Afshin-Jam. In 2013, the couple welcomed their first son, Kian, and are expecting their second child, a daughter, this fall. 

"The greatest gift of public life, it has been said, is the people that you meet and associate with. And for me, greater still, is the knowledge that it was through this public life that I met and married Nazanin, the love of my life."

Calling it a "bittersweet day," MacKay said, "part of me regrets that I will not be in the fray" of the next federal election but "simply put, I love my family more."

In introducing MacKay, Harper said he had "a mixture of tremendous pride and more than just a little bit of sorrow." He called MacKay an "outstanding public servant," a "great person" and a "historic figure."

MacKay's decision to serve until the writ drops saves Harper from yet another cabinet shuffle to fill a departing minister's gap. But it carves a hole in the Conservative re-election game plan.

Viewed as the unofficial leader of the more centrist, former Progressive Conservative wing of Harper's caucus, his pedigree as the son of a Brian Mulroney confidante and stature as Harper's senior player in Atlantic Canada gave him influence few others have had with the prime minister.

Senior ministers and MPs told CBC News on Friday that MacKay caught them off-guard.

"We'll miss him," Revenue Minister Kerry-Lynne Findlay said on her way into question period Friday. Tory Bob Dechert called him a "modern founder of Confederation" for the way he helped bring the Conservative Party together.

Caucus colleague Paul Calandra was one of several who said he thought MacKay had made the right decision for his young family.

Following Baird's lead?

The leaders of both the NDP and the Liberals wished MacKay well. Justin Trudeau said that as a father of young children himself he understood the decision.

Peter MacKay quits

Federal Justice Minister Peter MacKay, right, talks with Prime Minister Stephen Harper, as he announces his resignation in Stellarton, N.S., Friday. (Andrew Vaughan/Canadian Press)

"Turns out Peter MacKay is also ready for change," Tom Mulcair said at a speech in Toronto. "A lot of people seem to be leaving Stephen Harper's ship these days."

But MacKay emphasized he was stepping down "for entirely personal reasons."

"I'm not jumping ship," MacKay said, adding that he was open to any role supporting Harper and the Conservative Party in the upcoming election.

Life after politics for a politician with his experience and contacts often includes interesting private-sector offers or leadership in high-profile national or international public institutions. MacKay said it would be "disingenuous" to rule out a return to politics at a later date but emphasized, "it's really not in my immediate or long-term plans."

As far back as 2009, MacKay was touted as a possible contender for secretary general of the NATO military alliance.

But earlier this spring, MacKay dismissed suggestions that he could follow former cabinet colleague John Baird off the political battlefield and into a lucrative and perhaps more family-friendly second career.

"I filed my nomination papers, so I'm underway," MacKay told reporters in February. 

MacKay won his riding with comfortable margins in past elections. The Liberal party confirmed Friday that their candidate in Central Nova, David MacLeod, has resigned "for personal reasons," leaving both parties without a candidate in the now-open seat. 

Political roots, controversial shoots

MacKay, 49, was a Crown attorney before he was first elected in 1997. He has held several senior cabinet positions since the Conservatives took power in 2006, including foreign affairs and defence.

MacKay also served as the last leader of the now-defunct Progressive Conservative Party, and was a key player in the negotiations that led to the 2003 merger with the Canadian Alliance that created the current Conservative Party. The merger was seen by some in his former party as a betrayal of a deal he signed with leadership rival David Orchard not to run joint candidates with Harper's party.

Harper described that merger as a "willingness to compromise" as he spoke ahead of MacKay's announcement on Friday. 

"That moment in October 2003 changed without a shadow of a doubt the course of Canadian politics," Harper said.

PM Harper lauds 'historic figure' Peter MacKay13:39

His relationship with another leadership rival from his home province, Scott Brison, soured further when Brison left the party to run as a Liberal.

Once voted the "sexiest MP" in a survey by The Hill Times, his personal relationship with another former Tory leadership contender, Belinda Stronach, generated both headlines and gossip fodder when she famously crossed the floor and joined Paul Martin's struggling minority Liberal government in 2005.

MacKay retreated to his father's farm in Nova Scotia and famously quipped that at least the dog he now had for company was loyal, although it was later pointed out that the dog was not his.

A subsequent dog comment about Stronach off-mic in the House of Commons was not the last time he was accused of disrespecting women.

As defence minister, the athletic MacKay was often seen participating in active, hands-on events with the Canadian military, including being put through basic training for a CBC reality program.

But in another infamous controversy, MacKay was once picked up by a military helicopter from a personal vacation "under the guise" of search and rescue training.

MPs wish MacKay well2:29

MacKay's father, Elmer MacKay, served as a cabinet minister under Prime Minister Brian Mulroney.

"I have been on the receiving end of politics for a long time," MacKay said.

Early in his career, Peter MacKay worked for Thyssen Industries, an arms manufacturer lobbyist Karlheinz Schreiber — a friend of his father's — once represented in a bid to get a light-armoured vehicles plant in Nova Scotia.

He later said he did not know who Schreiber was at the time he took the job, and told reporters he became "leery" and warned his father to steer clear of the Airbus lobbyist.  

with files from Chris Hall and Evan Solomon