The largest refinery in the country is shutting down due to flooding at the facility in Port Arthur, Texas.

The Saudi-owned Motiva refinery will shut down indefinitely due to flooding from Hurricane Harvey, according to a statement from the company.

"At 5 a.m. on Wednesday, August 30, Motiva began a controlled shutdown of the Port Arthur refinery in response to increasing local flood conditions," the company said in a statement to the Washington Examiner. "Return to service is contingent upon recession of flood waters in the area. Our priority remains the safety our employees and community."

Saudi Aramco, the largest oil company in the world, recently acquired full ownership of the facility after decades as a joint owner with Shell. The announcement to close the facility was made soon after the company said it was shutting down 40 percent of its operations. The facility refines 600,000 barrels of crude oil into 275,000 barrels of gasoline and diesel fuel daily.

Its website touts it as the largest refinery in North America, and boasts the motto, "600,000 a day, every day." But the rain and flooding is proving too much for the behemoth to keep up even half of its production.

Rain levels for the continental U.S. struck a record last night at over 51 inches, the largest rainfall recorded anywhere in the United States.

Meanwhile, the largest independent refiner in the world, Valero, said it's getting ready to restart operations at its larger facilities at Three Rivers and Corpus Christi that had been shut down before the storm hit.

Spill Update

Valero reported after 11 p.m. on Tuesday that one of its oil storage tanks was submerged, resulting in a small oil leak that has since been contained. It said it has been in touch with Texas environmental authorities, the Environmental Protection Agency and even the Coast Guard.

"The Coast Guard is overseeing the cleanup and we are in full communication with [the Texas Commission on Environmental Quality], EPA and local regulators," an update from 11:40 p.m. Tuesday read. "Valero is conducting air quality monitoring in the local community. We found no detectable levels of emissions in the community."

At the same time, Exxon Mobil was forced to close two of its refineries on Tuesday, including the second largest one in the country in Baytown. One of its sulfur dioxide emission-control scrubbers was damaged due to flooding, causing the release of over 1,300 pounds of the toxic gas.

The EPA confirmed to the Washington Examiner late Tuesday night that it is working with state authorities to investigate the release.

"We are working hard to ensure the safety and wellbeing of our employees, our neighbors and the public," an Exxon spokesperson said.

Exxon's attempt at damage control comes after some Houston residents complained of an "unbearable chemical" smell.

Exxon has faced scrutiny for releasing hazardous chemicals before.

In 2010, Environment Texas and the Sierra Club sued the company, charging that the Baytown refinery emitted eight million pounds of pollutants over five years. A federal judge fined Exxon $20 million in that case.

EPA Administrator Scott Pruitt was unaware of the refinery sulfur dioxide release Tuesday when he called into the Chad Hasty Show on KFYO in Lubbock, Texas, to talk about his role in the federal recovery effort following the hurricane and the ongoing flooding.