Saladin retook the city in 1187, but it was recaptured by the Europeans during the Third Crusade in 1191. In 1251, Louis IX of France fortified the city, ordering the construction of high walls (parts of which are still standing) and a deep moat.