Saudi Arabia's efforts to clean up its electric grid have released a good amount of spare oil for export, which would help the United States avoid price spikes as President Trump's oil sanctions on Iran go into effect at midnight.

The U.S. Energy Information Administration reported Wednesday that Saudi Arabia's ability to transition away from its use of crude oil for electricity production has freed up a significant amount of oil. In addition, it has also increased its exports of diesel and gasoline into the market.

"In addition to refining more crude oil domestically, using less crude oil in power generation can enable Saudi Arabia to increase crude oil exports, if needed," the Energy Administration's "Week in Petroleum" analysis read.

Saudi Arabia burns an average of 400,000 barrels of oil per day for power generation, which is its lowest level in about a decade. It has switched a large chunk of its electricity production to natural gas, which had been burned off as waste product until recently.

During the summer of 2015, Saudi Arabia burned 900,000 barrels of oil per day for electricity. For context, the U.S. imports around 10 million barrels per day.

Iran oil exports, as of last fall, hovered around 1.9 million barrels per day just before U.S. sanctions kicked in. But then the administration issued an unprecedented amount of six-month waivers, allowing continued use of Iranian oil until May 2, 2019.

It's hard to say how much oil Saudi Arabia can inject into the market, and if the difference between 900,000 and 400,000 barrels per day for electricity generation, based on Energy Administration data, could be made available for export to soften the blow from Iran. The Energy Administration suggests a much lower number would likely be available.

However, Saudi Arabia has managed to quadruple its exports of fuel and other refined products into the market by turning away from oil for use at its power plants, according to the Energy Administration.

The White House says Saudi Arabia and the United Arab Emirates are poised to help meet any market difficulties as countries move away from Iranian oil.

The Energy Administration said that Saudi Arabia has more oil available for export due to its electricity transition, but its decision to cut oil production to rebalance the market earlier this year remains a prevailing factor.

The Organization of the Petroleum Exporting Countries' agreement to cut supplies in 2016 and 2018 to raise the price of oil after the market became oversupplied remains the "more significant factor" in calculating how much crude oil the country has available to export throughout the year, the Energy Administration said.

"Furthermore, Saudi Arabia has been cutting production beyond its agreed-upon target, meaning that as Saudi Arabia’s crude oil production falls, production of associated natural gas will also decline," the Energy Administration said. "Declines in associated natural gas production could result in an increased need for crude oil used for power generation."

Saudi Arabia is the largest user globally of oil for producing electricity, but has cut back its use of oil at power plants for environmental and emissions reasons, said the Energy Administration.

Iraq, which is the second largest user of oil for electricity, has also reduced its use in favor of natural gas. Iraq gets a major chunk of natural gas for electricity use from Iran.

Iraq has a waiver from the Trump administration to continue to import natural gas from Iran. Iraq's current exemption will last through the fasting month of Ramadan that begins in the next few days and ends in June.

The rest of the countries with U.S. waivers will not receive renewals, and must begin cutting all oil imports from Iran to zero beginning May 2.

The Energy Administration also reported Wednesday that U.S. gasoline prices began to climb higher in the last week, raising the average price of fuel 5 cents after a lull from a week earlier.