The heat wave that baked much of the United States in July resulted in the highest electricity demand since 2017, according to federal energy officials.

At 6 p.m. ET, July 19, hourly electricity demand for the lower 48 states peaked at 704 gigawatts, according to the Energy Information Administration’s U.S. Electric System Operating Data. That’s the biggest spike since July 20, 2017, when electricity demand in the lower 48 states hit 718 GW.

One reason for the high demand during this year’s July 15-22 heat wave was that temperatures didn’t cool down at night.

“On a typical summer night, electricity demand for the lower 48 states is usually lower than 400 GW, but during the heat wave, nighttime electricity remained between 430 GW and 450 GW,” said the report issued Aug. 1. “For this reason, more power generating plants operated continually during the heat wave.”

The PJM Interconnection, the regional grid system that serves mid-Atlantic states to the Chicago area, said peak power demand on July 19 beat its summer peak forecast—155,263 MW compared to the projected 152,315 MW.

However, the EIA noted that actual demand generally stayed within forecasts made by several regional grid systems in May 2019. For example, the New England Independent System Operator’s peak of 23,865 megawatts fell short of the forecast of 25,323 MW.

By July 23, lower temperatures reduced demand for electricity. “On that day, demand for electricity in the lower 48 states peaked at 589 GW, a level more consistent with hourly peak values of a typical summer day,” the report said.