A deadly blast during the inauguration of a major oil refinery by Iranian President Mahmoud Ahmadinejad killed 2 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, 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 deadly fire and released poisonous gases choking an unknown of workers at the complex, Mehr reported. The fire is still raging and there is the risk of further explosions, the news agency said. Security forces have sealed off the site and planes have been dispatched from Tehran to help evacuate some of the wounded.

A worker at the complex said that at least 30 people had been killed, the Khabar Online Web site said, adding that German engineers who had been working on the site had refused to come to the inauguration after there had been problems there on Monday.

Pro-government media, the Islamic Republic News Agency - headed by an ally of the president - did mention the explosion but stressed it was 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."

Lawmakers said sabotage was not in play in the Abadan incidents and instead accused Ahmadinejad of ignoring "well-known technical problems" in what they described as the hasty opening of the refinery.

"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," he told reporters.

Ahmadinejad is currently under heavy criticism from politicians, clerics and commanders for ignoring orders by supreme leader Ayatollah Ali Khamenei and his refusal to fire his closest aide who is accused of mingling with sorcerers and fortune tellers. Last week, after merging several ministries, Ahmadinejad appointed himself the caretaker of Iran's oil ministry, a move labeled illegal by his opponents.

Correspondent Thomas Erdbrink contributed to this article from Amsterdam.