Hawzah News Agency – Our neighborhood mosque was rebuilt a while ago. In the rebuilding process a basement was added, which was initially used as a prayer hall but was later rented out and is now being used as a restaurant. Is this repurposing permissible?
The additional floors added to preexisting mosques (whether top floors or a basement) that formerly lacked them are deemed consecrated grounds, and thus it is impermissible to lend them or to repurpose them for non-devotional uses such as serving as a restaurant.
Source: https://www.leader.ir/en/book/32/Practical-Laws-of-Islam