The Hobbit: The Battle of the Five Armies is a 2014 epic high fantasy adventure film directed by Peter Jackson from a screenplay by Fran Walsh, Philippa Boyens, Jackson, and Guillermo del Toro, based on the 1937 novel The Hobbit by J. R. R. Tolkien. The sequel to The Hobbit: The Desolation of Smaug, it is the final instalment in The Hobbit trilogy, acting as a prequel to Jackson's The Lord of the Rings trilogy. The film's story concludes the adventure of Bilbo Baggins and Thorin Oakenshield's company of dwarves, who take possession of the treasure beneath the Lonely Mountain as various factions clash over it, while Azog the Defiler and his forces make their move.