TORONTO — Canadian Prime Minister Justin Trudeau's government survived a confidence vote on Tuesday evening, averting the threat of a snap fall election amid a resurgence of the coronavirus in several provinces.

As expected, the government received key support from the left-leaning New Democratic Party on the vote on the “speech from the throne,” the address that opens a new session of Parliament and provides a broad sketch of the government’s agenda.

Lawmakers voted 177 to 152 in support of the speech, which was written by Trudeau and his aides, but delivered as is tradition by Governor General Julie Payette, Queen Elizabeth’s representative in Canada, on Sept. 23.

With his government reduced to a minority in last year’s federal elections, Trudeau has been reliant on the backing of at least one main opposition party to pass bills and stay in power. He secured support for the speech from the New Democrats after revising a relief bill to expand access to paid sick leave and benefits for workers left unemployed by the pandemic.

Parliament passed that legislation last week in a vote that the government also considered a test of confidence.

Trudeau, who was on the defensive for much of the summer during an ethics controversy that had pushed down his approval ratings, made the controversial decision in August to seek the suspension of Parliament. He pledged to return with a “bold” plan for getting through the pandemic and accelerating the economic recovery, which he said he would put to a confidence vote.

The speech, which was short on detail and dollar figures, reiterated several promises made in last year’s federal election campaign and featured others that would require support from Canada’s provinces and territories.

In it, Trudeau pledged to create 1 million jobs, to legislate net-zero emissions by 2050, to make a “significant” investment to create a national child-care system and to work toward a national program for prescription drug coverage. He also promised support for businesses that might need to shut down temporarily because of the pandemic.

The speech included a vow to use “whatever fiscal firepower” is necessary to address the challenges wrought by the public health crisis. Pandemic relief programs are projected to push the federal budget deficit beyond $250 billion, and business groups have sought details on plans to manage the debt.

“This is not the time for austerity,” the speech said.

The other opposition parties in Parliament voted against the speech. The Conservatives criticized it as “another speech full of Liberal buzzwords and grand gestures” that paid no attention to the struggles of the oil and gas sector. The Bloc Québécois lambasted it for infringing on areas of provincial jurisdiction and for failing to provide greater health-care transfers to the provinces.

Trudeau’s next test of confidence could come when his government introduces a budget or fiscal update in the coming months.