Harper and Gretzky played table hockey with some children at an event in Toronto last month.
The prime minister interviewed Gretzky in front of hundreds of supporters and the conversation mostly focused on hockey — until the end. The Hockey Hall of Famer told Harper he thought he had been an "unreal prime minister" who had been "wonderful to the whole country."
Harper's Conservatives were voted out of office when Justin Trudeau's Liberals won a majority government in Monday's federal election.
Gretzky has backed Conservative politicians before. He came out in support of Ontario Progressive Conservative Leader Patrick Brown in February during Brown's run for the party leadership.
But in an interview Thursday, Gretzky said he always heeds a prime minister's call, and the Harper event was no different.
"In 1981, I did a luncheon for prime minister (Pierre) Trudeau at the time. In 1986, Mr. (Brian) Mulroney and (his wife) Mila asked me to host an event for a charity of their choice, which I did," he said in an interview about his No. 99 Wayne Gretzky Collection fashion line.
The 54-year-old Gretzky also recalled joining Jean Chretien in the Czech Republic in 2003 to help promote Canada's bid for the 2010 Winter Olympics.
"When Mr. Harper reached out to me and asked me to do a Q&A with him it's simple: I can't vote in this country. But ... when the prime minister of Canada calls you, you say: 'OK, I'll do the favour for you.' So whoever is going to be the next prime minister, if they call me for the favour I'd reach out again."
Gretzky is ineligible to vote because of a controversial law that prevents Canadians who have lived outside the country for more than five years from casting a ballot.
"(Those are) the rules of the way the system is, and the Canadian people and the government passed those rules," he said. "And if (those are) the rules, you've got to live by the rules."
Also on HuffPost