You are not permitted to download, save or email this image. Visit image gallery to purchase the image.
Nine people were injured, one of them seriously, in the accident, which occurred on Saturday morning on a train line popular with tourists between the villages of Saint-Benoit and Annot in southeastern France, the officials said.
"An enormous rock broke off from the mountain and hit the side of the train with extreme force," Charbel Aboud, deputy prefect for the region, told a news conference, adding it may have weighed as much as 20 tonnes.
The two dead were a French woman from the region and a Russian woman who was travelling with her husband, he said.
Officials said it was the first such accident known on the line and it was unclear why such a large rock fell.
"It is too early to establish what were the factors, notably the weather conditions, that may have led to this boulder to break off," Transport Minister Frederic Cuvillier told reporters.
Southeastern France has experienced extremely wet weather in the past month, leading to flooding in the coastal Var region and mirroring floods in the northwest.
Netting is used along the line to prevent rockfalls, local officials added.
Seven people were killed last year when a mainline train derailed south of Paris in an accident that has been attributed to a fault on the track. (Reporting by Jean-Francois Rosnoblet and Marine Pennetier, additional reporting and writing by Gus Trompiz; Editing by Gareth Jones)