A deadly blast during the inauguration of a major oil refinery by Iranian President Mahmoud Ahmadinejad killed at least four and injured 20, the semi-official Mehr news agency reported Tuesday.

Authorities ruled out any form of sabotage and instead spoke of an industrial incident caused by a gas leak at the Abadan oil refinery, in one of the largest and oldest industrial complexes in Iran.

According to Mehr, a “testing machine” exploded almost directly after it was placed in the area where Ahmadinejad was preparing to give a speech.

“Immediately after this explosion, all those present left the scene and the president then delivered his speech in Golestan Club,” on the refinery site, the news agency said.

The explosion caused a fire that raged for hours and released poisonous gases, Mehr reported. Authorities warned that there was a risk of further explosions, the news agency said. Security forces have sealed off the area and planes were dispatched from Tehran to help evacuate some of the wounded.

Some independent media outlets said the death toll from the blast was much higher than what was reported by the state-controlled news services. The Khabar Online Web site, for example, which tends to be critical of Ahmadinejad, quoted an engineer at the refinery who said at least 30 people had been killed.

The Washington Post could not independently confirm the death toll.

Khabar also reported that German engineers who had been working on the site had refused to come to the inauguration because of safety concerns that arose Monday.

The Islamic Republic News Agency — which is headed by an ally of the president — made the explosion sound insignificant. “Due to a gas leakage there was a minor fire which was immediately put out by operational forces. The damaged section will return into production in coming days,” IRNA quoted Mohammad Reza Zahiri, chairman of the Abadan refinery managing board, as saying.

In recent months Iran has been hit by a string of accidents, including several explosions of gas transportation lines that officials said were caused by “terrorists.”

But in the Abadan incident, lawmakers accused Ahmadinejad of ignoring “well-known technical problems” and rushing to open the refinery too soon.

“This incident was not an act of intentional sabotage,” said Hamid-Reza Katouzian, head of Iran’s parliamentary energy committee, who is known for his criticism of Ahmadinejad. “Experts had warned that the refinery was not ready to be inaugurated.”

Last week, after merging several ministries, Ahmadinejad appointed himself the caretaker of Iran’s oil ministry, a move labeled illegal by his opponents.

Erdbrink reported from Amsterdam.