RIYADH, Saudi Arabia — A towering construction crane toppled over Friday during a violent rainstorm in the Saudi city of Mecca, Islam’s holiest site, crashing into the Grand Mosque and killing at least 107 people ahead of the start of the annual hajj pilgrimage later this month.

Images posted by social media users showed a grisly scene, with police and onlookers attending to numerous bodies lying amid pools of blood on the polished mosque floors.

Saudi Arabia’s civil defense authority provided a series of rising casualty numbers on its official Twitter account as ambulances whisked the injured to local hospitals. As of early Saturday, it said those injured in the disaster numbered 238.

A photo released by the authority showed police and workers in hardhats inspecting a pile of collapsed concrete slabs inside a part of the sprawling, ornately decorated mosque. Another showed the base of the toppled red-and-white crane tilted upward at a sharp angle.

Images aired on Saudi state television showed the crane’s metal boom smashed through what appeared to be the roof of the mosque.

Ahmed bin Mohammed al-Mansouri, the spokesman for the presidency of the Mecca and Medina mosque affairs, said in a statement that the accident happened late Friday afternoon during a severe storm carrying strong winds and heavy rain.