At least 10 states from the Midwest to the Northeast on Friday will again face smoky conditions created by raging wildfires in Canada, capping a week in which millions of people struggled to cope with poor air quality.

Smoke that has obscured skylines and made it difficult for some to breathe was expected to linger into the long Fourth of July weekend, according to the National Weather Service. However, the air quality was expected to slowly improve as thunderstorms help disperse the smoke and possibly clear the way for Independence Day firework celebrations.

As of 7 a.m. Eastern time, New York City had an Air Quality Index of 163, making it unhealthy. A reading of 301 or higher is considered hazardous. Similar air quality levels were reported Friday morning in Cleveland, Detroit, Milwaukee and Washington, D.C.

Some of the worst air quality in the country on Friday was in Pennsylvania, where Pittsburgh’s A.Q.I. was 189, according to AirNow.gov.

Lino Alayo, 42, a landscaper on the Upper West Side of Manhattan, began his Friday morning by checking the air quality level on his phone, followed by three pumps of his asthma inhaler. Well aware of the potential health risks, he’s forcing himself to work more slowly these days. “I just have got to learn how to adapt if this is going to be the new normal,” he said. “It raises a lot of fears.”

For much of the week, the Great Lakes Region, parts of the Midwest, the Northeast and the Mid-Atlantic were choked with smoke, prompting residents to stay indoors to avoid unhealthy air. Those forced to leave home for work, errands or other activities masked up to stay safe.

By Friday morning, there were almost 500 wildfires burning across Canada, with nearly half of them burning out of control, according to the Canadian Interagency Forest Fire Centre. Canada’s wildfire season started several weeks early this year, which means the fires could impact air quality across North America for weeks.

Sarah Maslin Nir contributed reporting.