More than 400 active wildfires were burning across Canada on Tuesday night, according to the authorities, exacerbating a wildfire season that has forced the evacuation of tens of thousands of people, created a sense of anxiety across the sprawling country and triggered air quality alerts hundreds of miles south in the United States.

The danger of wildfires, which over the past few weeks have stretched from British Columbia on the west coast to Nova Scotia, nearly 2,900 miles away in the east, was brought home on Tuesday to the political heart of the nation. A thick haze hovered over Parliament Hill and the soaring Gothic Revival building that houses Canada’s Parliament in Ottawa. The sun was obscured by smoke, the sky an apocalyptic orange hue.

Prime Minister Justin Trudeau of Canada said that hundreds of soldiers were deployed across the country to help with firefighting efforts. “This is a scary time for a lot of people,” Mr. Trudeau said early this week, noting that many Canadians who had to evacuate in recent days had just a few hours to pack before fleeing their homes.

In a country known for its picturesque landscapes and orderliness, the out-of-control wildfires have stoked unease and underlined the perils of global warming. Scientific research suggests that heat and drought associated with climate change are major reasons for the increase in bigger and more intense fires buffeting the country.

The fires have also underscored the interconnectedness between Canada and its neighbor to the south with smoke from the hundreds of wildfires blazing in eastern Canada casting a hazy pall over New York City and polluting air quality from Minnesota to Massachusetts.

In eastern Canadian cities like Toronto, Montreal and Ottawa, where the majority of the country’s people live, which had thus far been largely immune from wildfires in far away provinces, Tuesday ended any sense of complacency. Ottawa was among the places in Ontario with the highest health risk from its poor air quality, according to local authorities.

Palls of smoke also hung over Toronto, the country’s financial capital, on Tuesday night and schools announced that students would be spending recess on Wednesday inside. During the day, an acrid smell filled parts of the city as many residents avoided going outside.

“With wildfire smoke in the forecast for Toronto, is it time to bring back masks?” asked The Toronto Star, evoking bad memories of pandemic times.

With more than 160 active wildfires in Quebec on Tuesday, some residents in Montreal were shutting their windows. A smog hung over parts of the city, and health authorities advised residents in Laval, a city north of Montreal, to wear N95 masks.

The wildfires were also hurting businesses, with many mining companies suspending operations in Quebec.

Katrina Eyk, a senior meteorologist at Environment and Climate Change Canada, the ministry that coordinates environment policy, said that winds had been pushing plumes of wildfire smoke from Quebec across southern Ontario, undermining air quality and visibility. Canadian health authorities have warned the smoke can cause symptoms ranging from sore and watery eyes to coughing, dizziness, chest pains and heart palpitations.

“It’s still pretty yucky out there,” Ms. Eyk said from Toronto on Tuesday evening. “But on Thursday, it looks like with the wind overall shifting to the northeast, that plume could move directly overtop of the Greater Toronto Area and give pretty poor conditions.”

The wildfires have already shaken British Columbia and Alberta, an oil and gas producing province, where residents of its largest city Calgary have sat down for breakfast in recent weeks as pungent smoke leaked in from cracks under their front doors.

On the east coast of Canada, in Halifax, Nova Scotia, a wildfire late last month forced the evacuation of more than 16,000 people.

Michael Mehta, an environmental social scientist and professor at Thompson Rivers University in Kamloops, British Columbia, said that the visceral reality of smoke hovering over major cities could foster renewed debate on the risks of climate change.

Until now, he said, many on the east coast had not been exposed, firsthand, to the health risks of air pollution caused by wildfires that have gripped the western provinces over recent years. “There’s essentially a disconnect,” he said. “They haven’t had this experience.”