HOUSTON- Energy companies worked to restore pipeline service and electricity after Tropical Storm Nicholas passed through on Tuesday, allowing them to return to repairing the significant damage caused by Hurricane Ida two weeks ago.

Nicholas, downgraded to a tropical depression late Tuesday, caused rain, flooding and power outages in Texas and Louisiana, where some refineries remained offline in the wake of Hurricane Ida. The earlier storm shuttered most U.S. Gulf offshore oil and gas production. 

Royal Dutch Shell said it can resume production at its Perdido offshore oil platform that was shut by Nicholas once power is restored at another facility. U.S. liquefied natural gas producer Freeport LNG said processing at its Texas coast facility was halted, likely due to a power outage.

Oil prices rose about 2% on Wednesday after a larger-than-expected decline in U.S. crude inventories. Markets are very tight, said Infrastructure Capital Advisors analyst Andrew Meleney, with gasoline and other refined product inventories near five-year lows.

Nicholas caused widespread power outages as it crossed over the Houston area Monday night and Tuesday morning. There were 116,000 homes and businesses in Texas without power early on Wednesday, down from more than 500,000 on Tuesday. 

The storm surge along the coasts of northeastern Texas and Louisiana was expected to diminish by Wednesday morning, according to the National Hurricane Center.

More than 39% of the U.S. Gulf of Mexico's production of crude and natural gas remained shut, offshore drilling regulator Bureau of Safety and Environmental Enforcement (BSEE) said, following Hurricane Ida.

The storm has removed 25 million barrels of oil and 30.5 billion cubic feet of natural gas from the market. About 720,000 barrels per day (bpd) of crude production and 1.075 billion cubic feet per day of gas remained offline on Tuesday. 

Colonial Pipeline, the largest U.S. fuel line, resumed partial gasoline shipments Tuesday after Nicholas passed, and the company said it would restore service on its distillate line as quickly as possible.

Texas coastal oil refineries sailed through Nicholas. But a few in Louisiana are working to restart after Hurricane Ida, including Valero Energy Corp's refineries in St. Charles and Meraux and PBF Energy's refinery in Chalmette. 

(Additional reporting by Laura Sanicola, Liz Hampton, Swati Verma and Arpan Varghese; Editing by Nick Zieminski, Karishma Singh and Emelia Sithole-Matarise) ((Jessica.Resnick-Ault@thomsonreuters.com; +1 332 219 1145;))