The largest oil refinery in the country is shutting down as Hurricane Harvey causes more catastrophic flooding, and more have followed suit.

Early Wednesday, Motiva said it started closing its Port Arthur refinery "in response to increasing local flood conditions." The plant won't open until flood waters recede.

Motiva had been steadily reducing production at the plant for days. Late Tuesday it was running at only 40% capacity.

Harvey, which has been downgraded to a tropical storm, made a second landfall Wednesday near the Louisiana-Texas border. It is expected to bring winds of 30 to 40 mph and a 2- to 4-foot storm surge in the area.

Port Arthur is located along the border of both states. Mayor Derrick Freeman said on Facebook overnight that the "whole city is underwater right now."

All refineries in the area have been severely affected by the storm. Another company, Valero announced midday Wednesday that it had ceased operations at its Port Arthur refinery.

"Due to flooding and potential power supply interruption, Valero's Port Arthur refinery has shut down in a safe, controlled manner," the company said in a statement.

Total Petrochemicals said it shut down its Port Arthur refinery after it lost power Tuesday night.

And ExxonMobil (XOM) announced Wednesday that it would shutter another refinery in nearby Beaumont, citing Harvey-related "operational issues."

Exxon issued one of the first closures for its oil refinery in Baytown, Texas on Sunday. The company said it discovered roof damage at the plant, which is the second-largest in the country.

Thirteen oil refineries remain offline due to the storm, and flooding has knocked out about 22% of the nation's refining capacity, according to the most recent update from S&P Global Platts.

Related: Shale oil boom softens the energy blow from Harvey

Some plants -- like Valero's refineries in Corpus Christi and Three Rivers -- are beginning to resume operations. But it will take some time before they're fully back online.

The reduced capacity means significantly smaller amounts of oil can be turned into gasoline and other products like jet fuel.

Analysts predict drivers will see higher gasoline prices due to restrictions on supply.

The Motiva refinery is owned by Saudi Arabia. Saudi Aramco, the kingdom's state-owned oil giant, took full control of the plant in May.

-- CNNMoney's Matt Egan contributed to this report.