Richard was about to leave the Holy Land in July 1192, but upon hearing of the Fall of Jaffa to Saladin, he took a small force by sea and attacked Saladin's massive army. The element of surprise enabled them to release the crusader prisoners holed up in the citadel. The prisoners swelled their number and, despite the Saracen counter attack, they prevailed. This led to a peace negotiation with Saladin and a truce wherein Christians were once again allowed to visit Jerusalem.
Richard was well aware, by the time he left, that his enemies would be waiting to attack him while he was vulnerable in a small boat, defended by few men. He therefore left in disguise.