On the last night before election day, NDP Leader Rachel Notley made a final plea to voters.

“Our economy is more diversified,” she said. “Alberta is a climate leader. We are closer than ever to building a pipeline to tidewater.”

“We have built or modernized more than 240 schools ... expanded access to post-secondary education ... improved public health care ... our lowest paid workers make a better living.”

It wasn’t enough to save her job. The United Conservative Party won a majority government and former federal cabinet minister Jason Kenney is now Alberta’s premier-designate.

Notley retained her seat for the NDP in the Edmonton-Strathcona riding, beating UCP candidate Kulshan Gill.

In a gracious concession speech, Notley thanked her supporters and reminded them of the work Alberta's NDP government has accomplished in the last four years.

"This may feel like a step back but remember we have made tremendous progress,” said Notley.

“Four years ago Albertans hired us to do a very difficult job… and we did that job with purpose and we did that job with integrity,” she added. “Today Alberta is a better place because of it.”

Notley said she spoke with Kenney before her speech and offered her congratulations. She wished his UCP government well, adding that democracy is our greatest power.

She vowed that as the leader of the Opposition, she will do the job to best of her ability and will continue to fight for the values of the NDP Party.

“Yes tonight’s vote is not the result we had hoped or worked so hard for,” said Notley. “But no matter what our role is in legislature, we will not rest.”

Notley came to power in 2015 just after global oil prices tanked, causing a crisis for a government used to getting more than a fifth of its revenue from natural resources.

With lower prices, it was clear that there would be major job losses -- unless the province could build a new pipeline to an ocean, allowing producers to fetch more money per barrel overseas.

All the big pipeline proposals were in doubt. Environmentalists in B.C., the U.S. and Quebec all vowed to block any pipes from crossing their territories, in the name of fighting climate change.

In a province where the Progressive Conservatives had won every election since 1971, the 2015 election was widely expected to be a battle between the PCs and the breakaway Wildrose Party.

But Notley stunned pollsters by taking the lead. She seemed to connect with a wide range of voters, much like her father Grant Notley, who was leader of the Alberta NDP from 1968 to 1984.

Voters also liked her pitch. Rather than making cuts to health care and education to make up for the fast-declining oil sector royalties, she proposed raising corporate taxes and taking on more debt.

She also argued she could get the “social licence” to build a pipeline by showing Alberta was serious about fighting climate change. That meant a carbon tax and a cap on total oil sands emissions.

On May 5, 2015, Notley’s NDP grew from a four-seat rump to a 54-seat majority in the 89-seat legislature.

“Change has finally come to Alberta,” she said that night. “New people, new ideas, and a fresh start for our great province.”

“I think we have elected the most women of any government caucus in Canada,” she added. “So that’s kind of cool.”

As premier, Notley raised the minimum wage to $15 an hour, instituted a child benefit, and added new protections for workers -- a nod to her career as a lawyer for public sector unions.

She also won praise for seeing the province through one of its biggest crises: the 2016 forest fires that burned down parts of Fort McMurray and forced 88,000 to flee.

Two years into her mandate, it looked like Notley would finally get a pipeline. Prime Minister Justin Trudeau approved an expansion of the Trans Mountain pipeline through B.C.

“Let me say this definitively, we could not have approved this project without the leadership of Premier Notley and Alberta's climate leadership plan,” he said at the time.

But the pipeline got stalled by a federal court, and Notley’s partnership with Trudeau’s Liberals failed to deliver. Albertans blamed them both for the province’s economic malaise.

The Alberta unemployment rate was stuck at 7.0 per cent in March, far above the national rate of 5.7 per cent. Calgary’s was 7.7 per cent – the second highest in the country after St. John’s.

Meanwhile, the province’s debt ballooned to more than $50 billion.

Economic anger translated into a desire for change.

But while the voters turned on the NDP, they weren’t too hard on Notley. All major polls found her statistically tied with or ahead of Kenney on measures of likeability, even though they said they would not vote NDP.

In other words, don’t count her out of politics just yet.

----

Can't see our live blog below? Here's a link.

--