ON AUGUST 25th a gas leak at the Amuay oil refinery in western Venezuela set off a giant explosion. The force of the blast destroyed scores of homes and businesses in the surrounding area and has killed at least 41 people, many of them soldiers from a National Guard unit stationed nearby. Days after the fireball erupted, the plant’s fuel storage tanks were still ablaze, and pools of oil from seeping underground pipes filled the neighbouring streets. The government has suggested that the disaster was a freak accident. Its critics counter that the charred wreck of the refinery is an apt symbol for the overall state of Venezuela’s oil industry since Hugo Chávez became president in 1999.

The sector’s decline began in 2003, following a strike by the employees and managers of Petróleos de Venezuela (PDVSA), the state oil company, in protest against Mr Chávez’s leftist policies. When the conflict ended, the president had almost 20,000 workers sacked. Since then, PDVSA’s chairman, Rafael Ramírez, has steadily replaced them with loyal chavistas: he has made it an explicit company policy to employ only supporters of the president. He has also allowed Mr Chávez to use the company as a piggy bank for his “socialist revolution”: last year, PDVSA spent twice as much on off-budget government programmes as it did on taxes, royalties and dividends.

With so little attention paid to the actual business of extracting oil, it is little wonder that PDVSA’s production has fallen from 3m barrels a day in 1999 to 2.4m today, according to OPEC. In the same period, its foreign debt has risen fivefold. Moreover, oil union leaders say PDVSA’s industrial-safety procedures have deteriorated sharply. The petroleum and mining ministry’s annual report shows that maintenance work is frequently postponed for lack of cash. Residents of the Amuay area have told reporters that the gas leak was apparent hours before the blast, though the government denies this.

PDVSA has also been dogged by scandal and incompetence. In 2007 Guido Antonini Wilson, a Venezuelan-American businessman, flew from Caracas to Buenos Aires accompanied by numerous PDVSA employees on a plane that was chartered by Argentina’s state energy company. Upon arrival, he was caught trying to smuggle nearly $800,000 of cash in a suitcase. Prosecutors in the United States later alleged that the money, which had been provided by PDVSA, was intended for the presidential campaign of Cristina Fernández de Kirchner. Despite the explosive accusations, Venezuelan prosecutors declined to investigate the case, and the government attributed the claims to a plot against Mr Chávez by the American government.