The Messenger of God (PBUH) performed the prayer for rain in this place during a drought. He had not yet finished his prayer when the clouds covered it and it rained. Therefore, this place was called Ghamamah, meaning (clouds). The Messenger of God also led two Eid al-Fitr and Eid al-Adha prayers in this mosque.