United Conservative Party leader Danielle Smith has won the Alberta Provincial election and will continue as the next Premier of Alberta.

The UCP finished ahead in the race gaining 49 seats while Rachel Notley’s NDP scraped by with 38 seats.

The UCP finished the race with 52.6% of the popular vote totalling 926,918 votes, while the NDP pulled through with 44% of the vote totalling 776,188 votes.

During her speech, Smith said she is looking forward to continuing her work in balancing the province’s budget, increasing funding in healthcare and education and challenging the Trudeau government’s carbon tax as premier of Alberta.

“Hopefully the prime minister and his caucus are watching tonight,” said Premier Smith during her victory speech. “If he persists, he will be hurting Canadians from coast to coast.”

“As Premier I cannot, under any circumstances, allow these contemplated federal policies to be inflicted upon Albertans.”

Smith called on the Prime Minister to halt policies that would hurt the oil and gas sector and invited Trudeau to work collaboratively on meaningful reductions in emissions.

Smith promised to introduce legislation that would ensure that no government can increase personal taxes or taxes on job creators without a referendum.

Close races included UCP incumbent Tyler Shandro’s seat in Calgary-Acadia which was lost to NDP candidate Diana Batten who won the riding by seven votes.

The UCP also lost Calgary-Glenmore to NDP candidate Nagwan Al-Guneid who won by 30 votes.

UCP incumbent Muhammad Yaseen of Calgary-North won the race against NDP candidate Rajesh Angral by 113 votes.

The UCP also lost races in Calgary-Beddington, Calgary-Currie, Calgary-Edgemont and Calgary-Elbow.

The NDP dominated in Edmonton, taking every seat in the city.

UCP leadership candidates Todd Loewen, Brian Jean, Rebecca Schulz and Rajan Sawhney won their respective ridings.

Last week, Conservative leader Pierre Poilievre endorsed UCP leader Danielle Smith as premier in a video posted to Twitter.

Despite concerns over Election Alberta’s plan to use electronic tabulators earlier in the campaign, the evening’s vote count went smoothly as paper ballots were preserved.

EDITOR’S NOTE: This article has been updated with the latest polling data.