President Trump had spent much of the past two years promising to lower energy prices. Instead, the war with Iran and other policies drove up the cost of gasoline, diesel and electricity, while his administration blocked renewable energy investments that could have reduced reliance on fossil fuels or lowered costs.

Voter frustration with soaring energy bills helped Democrats win a sweeping victory on Tuesday, taking control of the House and Senate and winning governorships in many historically conservative states. Polling by The Associated Press found that concerns about gasoline and electricity costs informed many Americans’ voting choices. Gasoline prices nationwide were at a record high for an Election Day, according to AAA.

The war with Iran had the largest effect on energy costs, according to the report. The closure of the Strait of Hormuz disrupted global oil flows, and U.S. gasoline prices rose more than 40 percent after the war began. Diesel prices climbed nearly 70 percent.

Hasan Nazar, head of policy at clean energy finance company Crux, said energy affordability played a significant role in voters’ decisions. Catherine Wolfram, an energy economics professor at the Massachusetts Institute of Technology’s Sloan School of Management, said that starting a war with Iran was among the worst choices Trump could have made if his aim was to reduce energy costs, given Iran’s control of the Strait of Hormuz.

Sources: The New York Times Business.