It's been months since Stephen Harper packed up his Parliament Hill office, but on Friday he finally turned out the lights, resigning his seat as a Calgary MP and ending nearly two often-tumultuous decades in public office.

Harper, 57, made the decision in the final weeks of last fall's lengthy election campaign, that should the Conservatives lose power while he retained his seat in the House of Commons, he'd stay on as an MP — at least for a while.

As a result, the former prime minister has kept an ultra-low profile in and out of the House of Commons over the last 10 months, showing up for most — but not all — votes and entertaining visitors in his office while plotting his next moves.

Those moves will include working on various corporate boards, as well as spooling up a consulting firm he incorporated late last year with two of his longtime advisers Ray Novak and Jeremy Hunt.

Harper will be taking a specific interest in foreign affairs — a portfolio in which he takes a particular measure of pride, he said Friday in a farewell video message broadcast on social media platforms.

"Friends, we did a lot together, but I know the best is yet to come," he said, echoing remarks he made back in May at the Conservative convention.

"Our country must continue to serve as a model of prosperity and freedom. Pursue the principles we have stood for at home and abroad, and our children, and children's children, will inherit the Canada we know and love so dearly."

Staying on as an MP was also a matter of principle for the Toronto-born politician, who disapproved of Progressive Conservative leader Jim Prentice giving up his seat after the PCs were defeated by the NDP in last year's Alberta election.

It was Prentice who stepped aside in 2002 when Harper needed a seat as the newly minted leader of the Canadian Alliance. He'd already served four years as a Reform MP, and went on to merge the Alliance with the Progressive Conservatives to form the modern-day Conservative party.

"Through force of character, great wisdom, and endless work he managed to reunite conservative Canadians and fellow travellers to create a coalition that formed the longest-serving Conservative national government since Sir John A. Macdonald in the 19th century," Conservative MP Jason Kenney said in a statement.

Kenney was once considered heir apparent to Harper but is now seeking to replicate his unite-the-right legacy among conservatives in Alberta.

Ambrose: he 'helped lift children out of poverty'

Whether Harper's successes can endure will be tested next year when the party selects a new leader.

In her own statement, interim Conservative leader Rona Ambrose also paid tribute to Harper's achievements, noting his record on the Canadian economy, the criminal justice system and international affairs.

"The creation of the universal child care benefit helped lift hundreds of thousands of children out of poverty, and the Maternal, Newborn, and Child Health initiative has helped save the lives of millions of mothers and babies around the world," Ambrose said.

The Liberals have since replaced the UCCB, but the maternal, newborn and child health program is one piece of the Harper legacy they do support, said Liberal cabinet minister Marc Garneau.

"We don't agree with everything ... and we will change some things to be more in line with our values as Liberals," Garneau said. "But some things that he did put in place will remain in place."

Prime Minister Justin Trudeau tweeted his thanks to Harper for his years of service to Canadians before expanding on that theme at a press conference in in Saguenay, Que. where he was meeting with his Liberal caucus.

"His service as prime minister, and before that as party leader, to country has never been questioned,"  Trudeau told reporters.

"I understand what it is to be the son of a prime minister and therefore I'm thinking of (Harper's son) Ben, (wife) Laureen and (daughter) Rachel in the support that they've given Stephen Harper through many years of politics and I wish them all a very happy and productive and successful number of years away from the political spotlight."

While partisanship was often held up as a hallmark of the Harper era, Trudeau paid tribute to two moments where his former rival set that aside: the day a gunman stormed Parliament Hill in 2014 and the days after last year's vote, when the two sat down to discuss the transition of power.

"He conducted himself with grace and with full respect for not just the office but the country we serve and love so well," Trudeau said.

The Harper legacy2:29

Harper served as a Reform MP from 1993 to 1997, before taking a hiatus from politics until 2002.

That year he was elected as the leader of the Canadian Alliance and won a Calgary seat in a byelection. In 2003, he oversaw the merger of the party with the Progressive Conservatives and in 2004, became leader of the newly formed Conservative Party.

He led the Conservatives to a minority government victory in the 2006 election and again in 2008, winning his first majority mandate in 2011 after an election that was forced by opposition parties.


Text of Harper's message

Here is the full text of Stephen Harper's statement posted to Facebook Friday:

Greetings, fellow Calgarians and fellow Canadians.

Today I wish to inform you that I am stepping down as the Member of Parliament for Calgary Heritage.

For a total of nearly 18 years, I have had the tremendous honour of representing Calgary in the Parliament of Canada. On seven occasions (Harper was elected as MP in Calgary seven times) I have been deeply humbled by your trust and support, time and again. And I leave elected office proud of what our team accomplished together.

We united all Conservatives behind our agenda. We cut taxes, made critical investments and balanced the national budget. We got tough on crime and put families first. We managed our G7 economy through the worst global recession since the Great Depression, and came out in the strongest position of them all. We took principled decisions in a complex and dangerous world. And, whether at home or abroad, we were always proud to stand up for Canada.

Friends, we did a lot together, but I know the best is yet to come.

Our country must continue to serve as a model of prosperity and freedom. Pursue the principles we have stood for at home and abroad, and our children, and children's children, will inherit the Canada we know and love so dearly.

As I bid farewell to the Parliament of Canada, and prepare for the next chapter of my life, my eternal thanks to the constituents of Calgary Heritage, to the members of the Conservative Party, and to all Canadians for having given me the honour of serving the best country in the world.

May God bless all of you and may God bless Canada.

With files from CBC News