Five firefighting teams and three rescue teams joined in the fight against the blaze and doused it hours later, the Saudi News Agency quoted a security official as saying.
All Indian and Bangladeshi pilgrims in the building were evacuated and the cause of the fire was being investigated, said a spokesperson for the Civil Defence for Hajj Season.
Officials say the main events, beginning this coming Wednesday, are expected to draw over two million devotees from different parts of the world to Mecca city, a media report said.
Thursday is the most important day, when pilgrims assemble in the Arafat plain outside Mecca. The pilgrimage ends after Eid al-Adha, or the Feast of Sacrifice, Friday.