(Recasts with impact of upset, company statement)
HOUSTON, July 25 (Reuters) - A plant-wide power loss at a Pasadena, Texas, refinery forced the temporary closure of a portion of the Houston Ship Channel and residents of a town north of the waterway to shelter indoors on Monday afternoon, according to local and federal officials.
Petroleo Brasileiro SA's 112,229 barrel per day (bpd) Pasadena Refining System refinery lost power as the industrial Houston suburb was hit by heavy rains and thunderstorms, the company said in a statement to area residents.
Due to the power outage, the refinery set off its safety flare system to burn off hydrocarbons that the halted refinery machinery could not process, sources familiar with plant operations said.
It was unclear if lightning struck the refinery or the downpour affected refinery equipment, the sources said.
The U.S. Coast Guard halted ship traffic on the Houston Ship Channel just north of the refinery as dense smoke containing sulfur dioxide streamed across the waterway toward Galena Park, Texas, where residents were told by city officials to remain indoors with windows closed and air conditioners off in the 93-degree Fahrenheit (34 Celsius) heat.
The flaring had stopped by 6 p.m. CDT (2300 GMT) with the ship channel reopen and the shelter-in-place order lifted.
Pasadena Refining was working to restore power on Monday night, the sources said. (Reporting by Erwin Seba and Liz Hampton; Editing by Terry Wade and Leslie Adler)