Kingdom of Heaven is a 2005 epic historical drama directed and produced by Ridley Scott and written by William Monahan. It stars Orlando Bloom, Eva Green, Jeremy Irons, David Thewlis, Brendan Gleeson, Marton Csokas, Liam Neeson, Edward Norton, Ghassan Massoud, and Alexander Siddig. The story is set during the Crusades of the 12th century. A French village blacksmith goes to aid the Kingdom of Jerusalem in its defense against the Ayyubid Muslim sultan Salahuddin, who is battling to reclaim the city from the Christians leading to the Battle of Hattin. The film script is a heavily fictionalized portrayal of the life of Balian of Ibelin (ca. 1143–93). Filming took place in Ouarzazate, Morocco, where Scott had previously filmed Gladiator and Black Hawk Down. Filming also took place in Spain, at the Loarre Castle (Huesca), Segovia, Ávila, Palma del Río and Casa de Pilatos in Sevilla.