Despite being denied the ability to vote, hockey great Wayne Gretzky endorsed Conservative Leader Stephen Harper during an event in Toronto.

"I think you have been an unreal prime minister," Gretzky said, following a brief Q&A with Harper that mostly covered hockey.

Gretzky said that Harper has been "wonderful to the country." The hockey legend wished him success and said that he knew the Conservative leader had the country's best interest at heart.

Harper called Gretzky one of the great hockey leaders of all time.

More than a million Canadians living abroad will not be allowed to cast ballots in the Oct. 19 federal election following a recent court decision.

In May 2014, an Ontario Superior ruling granted ex-pats who have lived outside the country for more than five years the right to vote for the first time since a federal ban was put in place in 1993. But that ruling was overturned by an appeal court in July, just months before the election.

At a Conservative campaign event held earlier today in Calgary, where the Conservative leader was accompanied by NHL player Sheldon Kennedy, a reporter asked Harper about The Great One's inability to cast a ballot.

"Obviously, we want to make sure that we have fair rules to make sure that Canadian elections are decided by Canadian residents," Harper said. "I've never heard Mr. Gretzky challenge that particular notion."

The Conservative Leader is doing an even with Wayne Gretzky in Toronto Friday afternoon. 0:44

Gretzky is a dual U.S.-Canadian citizen, but he spends most of his time in the United States.

At the United for Ukraine Gala held in Toronto in 2014, Gretzky praised Harper for his support of Ukraine.

"It's really amazing … the leadership we have right now. One of the greatest prime ministers ever," Gretzky said.

It's not the first time that Gretzky has publicly endorsed a Conservative candidate.

He also waded into the Ontario Progressive Conservative leadership campaign, endorsing Patrick Brown.

"I have known Patrick Brown for a number of years now," Gretzky said in a statement. "Hard working and dedicated, Patrick is a strong Conservative. He has the passion and vision to lead Ontario."

In other celebrity endorsement news, Canadian actor Donald Sutherland openly supported the NDP earlier in the week.

"Put in Mulcair … or if you can't put in Mulcair put in Trudeau's son, Justin," Sutherland told CP24, as he promoted Forsaken at the Toronto International Film Festival.

The veteran actor, who is the son-in-law of NDP founder Tommy Douglas, has been an outspoken critic of federal voting restrictions for expatriates.

Some people were upset that The Great One would endorse Harper

Seriously Gretzky, you are going to campaign for Harper but he took away your right to vote. Are you that dense? —@kellypatrickxox

Gretzky is meeting with Harper...Why? #99, why? <a href="https://twitter.com/hashtag/blahgretsky?src=hash">#blahgretsky</a> —@mountainmetissk

While some made jokes about it

Gretzky endorsing Harper in Toronto will piss off more people in that city than his 1993 Game 6 high stick on Doug Gilmour. <a href="https://twitter.com/hashtag/elxn42?src=hash">#elxn42</a> —@derrickokeefe