MEDICINE HAT, Alta. - A large turnout for Justin Trudeau during an Alberta byelection campaign wasn't enough of a push for the Liberals in the federal constituency of Medicine Hat-Cardston-Warner.

Conservative Glen Motz, a retired Medicine Hat police officer, cruised to an easy victory as votes were counted Monday night.

With more two-thirds of the polls reporting and Motz with more 68 per cent of the votes at around 10 p.m., Liberal candidate Stan Sakamoto offered his congratulations in person at Motz's campaign headquarters.

"I had intended to do the same thing, that was the conversation that we had just before this was over," Motz said from his headquarters.

"In this part of the world, that's very common. That's how we respect each other."

The byelection was called after MP Jim Hillyer died of a heart attack earlier this year in his Parliament Hill office.

The prime minister attracted about 2,500 people when he visited the riding earlier this month in an effort to boost the chances of Sakamoto.

It may have helped. Despite the loss, Sakamoto got close to a quarter of the votes, which was significantly higher than the nearly 18 per cent the Liberals received in the riding in 2015.

However, the gain appeared to come at the expense of the NDP, which was battling for last place with the Rhinocerous Party candidate as votes were counted Monday night.

Motz, meanwhile, said Trudeau's visit backfired and actually energized his own supporters.

"Our campaign office was absolutely going crazy in the days leading up, and the day of, and the day following (Trudeau's visit)," Motz said.

"We couldn't keep up with sign requests, we couldn't keep up with volunteer requests and people who wanted to go vote."

Medicine Hat-Cardston-Warner was a new riding in the 2015 election - it was formerly Medicine Hat.

The riding, like the rest of Alberta, has been hit hard by low oil prices and Motz said during the campaign that some people in the area had lost their hope and optimism based on the Liberal government's rhetoric. Rather than job creation, he said there are increased taxes and the proposed carbon tax.

Sakamoto said before election day that the area had been a "forgotten corner" for decades and hoped to bring more employment.

The last MP that Medicine Hat voters elected who wasn't from a right-of-centre party was Bud Olson, who was originally voted in as a member of the Social Credit and crossed to the Liberals.

He was re-elected when the party swept to power under Pierre Trudeau in 1968, but Olson lost in 1972.

The province went Conservative blue in all but five of its 34 federal ridings in last fall's federal election.

Political scientist Lori Williams, from Mount Royal University, said during the campaign that the Liberals had more resources to pour into the race because it was a byelection. She also suggested the possibility of having a local MP at the cabinet table might influence some people to be open to change.

But she said Hillyer had won in 2015 with 67 per cent of the vote - a margin that would be very difficult for the Liberals to overcome.