A large explosion has struck a coal mine in northern Iran, trapping dozens of miners and killing at least two, state media reported.

Ambulances, helicopters and other rescue vehicles raced to the scene in Iran's northern Golestan province as authorities worked to determine the scale of the emergency.

The IRNA news agency quoted Golestan provincial emergency management department head Sadeq Ali Moghadam as saying that 40 to 50 people are believed to be trapped in the mine outside of the town of Azadshahr.

Press TV, the English-language arm of Iranian state television, said two workers had died.

Provincial spokesman Ali Yazerloo said the blast happened at 12:45pm local time and that the provincial governor is heading to the scene.

Several officials blamed the explosion on accumulated gas and said it was affecting rescue efforts.

Iranian news reports said the explosion happened while workers were changing shifts.

Semi-official Iranian news agencies posted pictures online from the scene, showing ambulances and emergency workers gathered at the mouth of the mine.

Some images showed dazed workers, covered in coal dust, being helped by bystanders.

More than 500 workers are employed at the Zemestanyurt mine, which lies nine miles from Azadshahr, according to IRNA.

Golestan sits along Iran's northern border with Turkmenistan and along the shore of the Caspian Sea.