The Great Siege of Gibraltar was a siege attempted by Spain and France to capture Gibraltar from the Kingdom of Great Britain during the Anglo-French War and the Anglo-Spanish War. This was the largest action fought during the war in terms of numbers, particularly the Grand Assault of 18 September 1782. At three years and seven months, it is the longest siege endured by the British Armed Forces.