Venezuelan firefighters put out a blaze at the country's biggest oil refinery on Tuesday, paving the way for a restart of the facility and an investigation into the world's deadliest refinery accident in fifteen years.

Energy Minister Rafael Ramirez has said the 645,000-barrel-per-day Amuay facility should restart within two days of the fire being extinguished. A pre-dawn blast on Saturday killed 48 people, wounded dozens and flattened hundreds of homes.

U.S. gasoline futures tumbled on Tuesday after soaring the day before, driven by the resolution of the Amuay blaze and the smaller-than-expected impact on U.S. Gulf Coast refineries from Hurricane Isaac, which is expected to make landfall there late in the day.

None of Amuay's processing units were hit by the blaze, though refinery operations were shut down on Saturday for safety reasons. State oil company PDVSA says it has sufficient stocks to meet domestic and international market demand.

The blaze was out by mid-day, even though one fuel storage tank burned intermittently in the morning - flaring up twice only minutes after authorities had declared it extinguished.

The charred remains of three fuel tanks stood behind piles of rubble scattered by the blast at Amuay.

A refinery manager said teams were working to cool the extinguished tanks, begin an inspection of the grounds and prepare for the restart.

"As soon as I got up I left the house and said 'Thank God they managed to put that fire out,'" said Juan Padilla, 76, a former refinery worker who lives in the neighboring Ali Primera area. "I'm going to sleep easy tonight."

It was one of the most deadly oil industry accidents in recent years, nearing the toll of the 1997 fire at India's Visakhapatnam refinery that killed 56 and topping the 2005 blast at BP Plc's Texas City refinery in which 15 people died.

More than 50 people were declared dead or missing last year after a drilling rig sank in the icy seas off eastern Russia.

CHRONIC REFINERY PROBLEMS

The incident has thrown a spotlight on the shoddy performance of Venezuela's refineries, which for the last decade have suffered frequent accidents and unplanned outages.

PDVSA officials deny allegations by critics that the blast may have been caused by a lack of maintenance. Many of the dead were National Guard troops who were providing security in a compound next to the tanks.

Even after Amuay is up and running, PDVSA may have to rely more than usual on fuel imports, traders say. Problems at tank farms can often make it difficult for companies to properly blend gasoline.

PDVSA has for years been a recurrent fuel importer due to frequent refinery outages. While tame in comparison to Saturday's explosion, the outages still hamper output of oil products.

During a visit to the scene on Monday, President Hugo Chavez promised to set up a $23 million fund to help pay for clean-up operations and replace destroyed homes.

Authorities on Tuesday, seeking to show a quick response for the victims, gave new houses to families that had lost homes.

"I really love you, Chavez," one elderly woman in tears told the president via a live television transmission showing her holding keys to her new home. "Thanks to you, I have this."

The accident has complicated President Hugo Chavez's re-election campaign. It has pulled him away from his usual schedule of exuberant rallies and left him fending off accusations of mismanagement of the oil industry.

But the accident is not expected to be a major issue in the October 7 election, which polls broadly show Chavez winning.

Government agencies such as the labor and environment ministries are unlikely to punish PDVSA. The company's frequent refinery incidents rarely draw sanction.

In contrast, BP in July agreed to pay $13 million to settle safety violations at its Texas City refinery.