Kingdom of Heaven is a 2005 historical drama film directed and produced by Ridley Scott and written by William Monahan. It features an ensemble cast including Edward Norton, Orlando Bloom, Eva Green, Jeremy Irons, David Thewlis, Brendan Gleeson, Marton Csokas, and Liam Neeson. The film is a portrayal of the events leading to the Third Crusade, focusing mainly on Balian of Ibelin who fights to defend the Crusader Kingdom of Jerusalem from the Ayyubid Sultan Saladin. Filming took place in Ouarzazate, Morocco, and in Spain, at the Loarre Castle (Huesca), Segovia, Ávila, Palma del Río, and Seville's Casa de Pilatos and Alcázar.