The war with Fatimid Egypt began when the First Crusade invaded Fatimid territory and started the Siege of Jerusalem in 1099. Soon after, the Crusaders stormed and captured the city. The war between the newly established Latin Kingdom of Jerusalem and Fatimid Egypt continued until Saladin became the effective ruler of Egypt in 1169.