Like Mecca , the city of Medina only permits Muslims to enter . The haram ( area closed to non-Muslims ) of Medina is much smaller than that of Mecca , though . Like Mecca , the city of Medina only permits Muslims to enter , although the haram ( area closed to non-Muslims ) of Medina is much smaller than that of Mecca , with the result that many facilities on the outskirts of Medina are open to non-Muslims , whereas in Mecca the area closed to non-Muslims extends well beyond the limits of the built-up area .