The Crusader States had endured from 1099 to 1187 because the Muslim Middle East was politically fragmented. Once Saladin had overthrown Egypt’s Fatimid Caliphate and united Egypt to Muslim-controlled Syria and northern Iraq, he was able to turn his resources to destroying the Crusader States. Eventually, at the 1187 Battle of Hattin, his forces met the combined forces of the Kingdom of Jerusalem. The result was a complete victory for Saladin. With the manpower of most of the Kingdom of Jerusalem killed or captured—knights and noble prisoners would be held for a hefty ransom, while lower-ranked soldiers would go to slave markets—he was easily able to capture most of the castles and cities that made up the kingdom, to include the city of Jerusalem itself.
The result shocked the Christian world, and Pope Gregory VIII quickly issued a bull (that is, an official papal pronouncement). Audita tremendi called on the Christian world to retake Jerusalem. The kings of England and France, Richard I (known as Lionheart, r. 1189 – 1199) and Philip Augustus (r. 1180 – 1223), respectively, took vows to launch a crusade, as did Holy Roman Emperor Frederick Barbarossa. (As usual, the Christians of Iberia took little part in crusades in the Levant, as their efforts focused on the Reconquista.)
Although Frederick Barbarossa died en route (he drowned in a stream in the mountains of Anatolia), both Richard I and Philip Augustus eventually arrived in the Levant by sea. Although Philip soon returned to France, King Richard battled Saladin over the course of two years. The results were mostly inconclusive. The crusading army seized most of the castles and cities on the coast, which became the center for a restored, but smaller Kingdom of Jerusalem. But, the Crusaders ultimately failed to take Jerusalem itself. The Third Crusade ended in a truce. One term of the agreement: Christian pilgrims were allowed to visit the city of Jerusalem, even though it remained under Muslim rule.