Ottoman territories in the Balkans, Fletcher finally arrived in Constantinople on 29 March 1799. In June 1799, Fletcher, alongside Ottoman troops, advanced into Syria, forcing Napoleon to forgo his siege of Acre and retreat to Egypt. During 1799, after his return from Syria, Fletcher took part in the preparation of the defences for the Turks in the Dardanelles. After a spell with Ottoman forces in Cyprus, Fletcher returned to Syria in June 1800, to oversee the construction of fortifications at Jaffa and El Arish. Fletcher served under Sir Ralph Abercromby in December 1800 at Marmaris Bay, practising beach assaults for the expected invasion of Egypt the following year. An expedition to reconnoitre the Egyptian port of Alexandria, led to Fletcher's capture when, while returning to his ship after a night reconnaissance mission ashore, Fletcher was intercepted by a French patrol vessel. He was held prisoner in Alexandria until its capture on 2 September 1801. In October 1801, when the general armistice was signed, Fletcher returned to England, having been promoted to captain while he was imprisoned and later decorated by the Ottoman Empire for his services. The Treaty of Amiens was signed on 25 March 1802 but peace was short-lived and war broke out in May the following year. Fletcher was again sent to Portsmouth where he helped bolster the defences of Gosport. Promoted to major on 2 April 1807, Fletcher took part in the Battle of Copenhagen in August that year. Peninsular War Soon after the start of the Peninsular War, Fletcher was sent to Portugal. He was part of the force that occupied Lisbon when the French withdrew following the Convention of Sintra, after which he accompanied Wellington as his chief engineer in the field. Promoted to lieutenant-colonel in the army, 2 March 1809, and then the Royal Engineers, 24 June 1809, he fought at the Battle of Talavera (27-28 July 1809) for which he received a mention in dispatches. Lines of Torres Vedras It was while Wellington was making preparations for a retreat to Portugal, that Fletcher became famous for one of the greatest military engineering feats in history. The celebrated Lines of Torres Vedras were constructed on the narrow peninsula between the Atlantic and the Tagus. These three lines of defence; the first 6 miles in front of the principal one and the last 20 miles behind, were intended to protect Lisbon and provide a line