High winds have been blamed for causing a massive crane to topple and crash into Mecca's Grand Mosque, killing at least 107 people ahead of the start of the annual hajj pilgrimage.

Suleiman bin Abdullah al-Amro, the head of Saudi Arabia's civil defence directorate, told broadcaster Al-Arabiya that unusually powerful winds also tore down trees and signs as a storm whipped through the area.

He denied reports that lightning brought down the red and white crane, or that some of those killed died in a stampede.

The directorate said 238 people were injured in the accident on Friday afternoon at the mosque, which houses the cube-shaped Kaaba and is ringed by several cranes engaged in ongoing construction work to expand the site.

A photo released by the directorate showed police and workers in hard hats inspecting a pile of collapsed concrete slabs inside a part of the sprawling, ornately decorated mosque.

Another showed the base of the toppled crane tilted upward at a sharp angle. Images aired on Saudi state television showed the crane's metal boom had smashed through what appeared to be the roof of the mosque.

The mosque is Islam's holiest site to which Muslims face in daily prayers and forms the central site among the hajj rituals.

Performing the pilgrimage once during one's lifetime is a duty for all able-bodied adult Muslims. This year's pilgrimage is expected to start around September 22.