The holy citiy of Mecca can only be visited if you are a Muslim. When entering the city you have to pass check points of the religion police. At these checkpoints they make sure that only Muslims visit the holy cities. If you are not a Muslim, it is only possible to visit Medina.