President Rouhani also reiterated that the incident has also distressed him, voicing Iran's willingness to deliver medical services to those affected by it, IRNA reports.
According to the reports, 107 people including one Iranian pilgrim were killed in the crane collapse that happened Friday afternoon in Mecca, Saudi Arabia.
In his message, President Rouhani extended condolences to the bereaved families and wished speedy recovery of the injured.
Most of the dead are from Afghanistan and Pakistan.
Iran's medical delegations are serving the Iranians and non-Iranians who were injured in the event.
A huge crane crashed into a part of the Grand Mosque - the largest in the world - that was filled with worshippers at the time.
The head of Saudi Arabia's civil defense said strong winds and heavy rains had caused the collapse.
Mecca is currently preparing for the annual Muslim Hajj pilgrimage.
Hundreds of thousands of people are expected to arrive in the Saudi city from all over the world later this month.