The Great Siege of Gibraltar was an attempt by France and Spain to capture Gibraltar from Great Britain during the American Revolutionary War. Lasting from July 1779 to February 1783, it was the fourteenth and final siege of Gibraltar. During the siege, British and Spanish forces faced each other across an approximately wide stretch of the marshy open ground that forms the isthmus immediately to the north of the Rock of Gibraltar. The British lines blocked access to the City and the western side of the Rock, while the eastern side of the Rock was inaccessible because of its steep terrain. Gun batteries were placed in a series of galleries on the north face of the Rock, providing overlapping fields of fire so that infantry attacks would come under heavy fire throughout their advance.