MONTREAL — The return of conservatives to power in oil-rich Alberta adds another province to a growing bloc of opposition to Prime Minister Justin Trudeau of Canada and his government.

Returns late Tuesday night showed the United Conservative Party led by Jason Kenney, a former Conservative federal cabinet minister, leading the New Democratic Party under Rachel Notley by a substantial margin.

While neither Mr. Trudeau nor his Liberal Party has ever been particularly popular in Alberta, the loss of a left-of-center ally is not welcome news for him six months before the federal election. Mr. Trudeau has been weakened by allegations from a former attorney general that he improperly intervened in a criminal case.

Much of Mr. Kenney’s campaign fed on economic and political frustration in the province, which has been afflicted by job losses in the energy industry since the global collapse of oil prices more than four years ago.