It said 154 people were injured as well.
Al Jazeera’s Hasan Patel, reporting from Mecca, said witnesses told him that a crane fell on the third floor of the Grand Mosque around 5.45pm.
Our correspondent said the mosque was packed, even though the incident happened shortly before the 6.30pm prayer.
“Dozens of ambulances are heading to the site. The authorities closed off the area shortly afterwards,” he said.
“This whole place is already a construction site. What made it worse is that around 5.30pm there was severe rain and it’s just gushing down the road,” he said.
“I am surrounded by people who are grieving. The mood here is of sadness.”
Al Jazeera’s Omar Al Saleh said bad weather was thought to be the cause of the accident.
There were reports that lightning may have struck before the crane collapsed.
Hundreds of thousands of pilgrims are expected to visit Mecca for the annual Hajj pilgrimage, which starts on September 21.