OTTAWA - Prime Minister Stephen Harper will formally step down next week, just before Justin Trudeau's Liberal government takes office.

Rideau Hall says Harper visited Gov. Gen. David Johnston right after the election and said he would resign as prime minister in the wake of last week's Liberal majority victory in the federal election.

A spokesperson says Harper will quit Nov. 4, just prior to the swearing-in of Trudeau's Liberals, which is scheduled to take place that same day.

Harper has been prime minister since February 2006.

Moving trucks have been at the prime minister's residence at 24 Sussex Drive as the Harper family prepares to move back to Calgary.

Harper, meanwhile, has been making calls to defeated Conservative MPs and ministers.