Tens of thousands of New York City residents were without power Monday morning as electrical equipment strained to keep up with demand in a heat wave that has roasted much of the East Coast for days.

Roughly 24,000 customers were without power in Queens and Brooklyn as of 4 a.m., according to the tracking site PowerOutage.us⁠.

New York City Mayor Bill de Blasio attributed the blackout to days of heat strain and said a local power company, Con Edison, had temporarily cut off electricity to several neighborhoods for repairs to prevent more outages.

Con Ed tweeted early Monday that it had restored power to about half of the 33,000 customers who were in the dark.

"It’s still above 90 and I know there are a lot of hot and frustrated people out there, not just in Brooklyn but in parts of Queens and the Bronx," de Blasio tweeted. "Con Ed is working to restore power and City agencies are working to help speed up restoration in every way we can."

In a series of statements on Sunday night, Con Edison said it was reducing "voltage by 8 percent to maintain reliability" in some parts of Queens, the Bronx and Brooklyn.

The outages occurred just one week after an electrical substation failure left an estimated 72,000 Con Ed customers without power in Manhattan.

While cooling was expected to begin Sunday in the Midwest, the Eastern Seaboard remained at near-record temperatures, the National Weather Service said in a statement.

Areas from the Carolinas to Maine were under the greatest heat threat, the weather service said, with daytime highs in the mid- to upper 90s combined with humidity that will make it feel more like 100 to 110 for many.

Record temperatures were recorded Saturday at New York City's John F. Kennedy International Airport and at Atlantic City, New Jersey, where it registered 99 degrees in each location.

Download the NBC News app for breaking news

Both Boston and Hartford, Connecticut, came within two degrees of their record highs for the date, at 97 and 98 degrees, respectively.

But the figures did not reflect how hot it felt because humidity boosted perceived temperatures into the triple digits, forecasters said, making New York City feel like 111 degrees, Washington 112 and Chicago 105.

Children play in the fountain at Washington Square Park in New York on Friday. Carlo Allegri / Reuters

As many as 169 million people from Oklahoma to Maine were under heat alerts Saturday, and early morning lows Sunday were expected to approach records, forecasters said.

"Overnight will provide little relief as temperatures struggle to get below the upper 70s or even low 80s," the National Weather Service said.

The heat killed at least five people — a man in Prince George's County, Maryland; a woman in Worcester County, Maryland; former New York Giants football player Mitch Petrus, 32, who died of heatstroke in Arkansas; and a 54-year-old man and 71-year-old woman in Cook County, Illinois, according to medical examiners.

Forecasters said cooling could exceed 10 degrees Monday after the cold front moves into the Great Plains.