In 622 the Prophet was forced to flee to the nearby city of Medina, a journey which served as the starting date for the Muslim calendar, and he then waged a bloody and prolonged war of religion against Mecca, finally conquering the city shortly before his death in 632.