OTTAWA -- 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 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.

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 repealed 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."

While partisanship was often held up as a hallmark of the Harper era, Prime Minister Justin Trudeau paid tribute Friday 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.

Read the full statement: Stephen Harper resigns as MP