SCOTS played an outsized role in the British Empire, in the Caribbean, India and Middle East. They filled the ranks of the administrators, soldiers, and merchant classes in Britain’s colonies.

Less well-known are the histories of the many Scots who lived in lands beyond the empire’s direct control. In the 18th and 19th centuries, Scots could be found across the Middle East working as merchants and diplomats or serving foreign governments. The largest power in the Middle East in this period was the Ottoman Empire.

From its capital in Istanbul, at its greatest extent Ottoman rule stretched all the way to Kuwait and Iraq, down the Red Sea to Mecca, west along the North African coast into modern Algeria, and north into Hungary and Crimea.

Despite the vast territory they controlled, by the 18th century, the once-feared Ottoman armies were lagging behind those of Europe. To keep pace with their rivals, the empire began hiring European officers and scientists to introduce the latest military developments.

English, French, and German soldiers would take service with the Ottomans, as did some Scots.

Archibald Campbell was a Scottish nobleman who left Scotland in the 1740s following a duel. He travelled to Istanbul, where he co-founded cannon foundries and a school of mathematics for naval officers with the French-Slovak officer Francois Baron de Tott in 1775.

READ MORE: Emily Clarkson condemns her father's 'misogyny' towards Meghan Markle

Campbell, known to the Turks as Ingiliz Mustafa (English Mustafa), would eventually convert to Islam and, as a general in the Janissaries, the Ottomans’ elite military corps, became the kumbaracibasi, or general of bombardiers, and head of artillery manufacturing for the empire. He took a genuine interest in his new home, committing himself to support a scheme to establish a new Turkish printing press in Istanbul in 1779.

Other Scots came to the empire for trade or for diplomacy. Robert Liston, a career diplomat from Kirkliston, had served in British embassies in Germany, Spain, and Sweden before he was appointed ambassador to the Ottoman Empire in 1794.

He would hold the post twice, first for just two years and again from 1812 to 1820. The start of his second embassy was a crucial period, during which Liston had to try to end the Ottomans’ war with Britain’s ally Russia and prevent the Ottomans from allying with Napoleonic France.

The Levant Company, an English trading company set up in 1592, had agencies across the Middle East. Their merchants were almost entirely English, but Scots could find work with the company as administrators and physicians.

Alexander Russell, an Edinburgh doctor, travelled to Aleppo in Ottoman-ruled Syria in 1740 and he opened a medical practice that served both the company’s agency there and the local population. He would write The Natural History of Aleppo, a detailed study of the city.

Through his medical work in Aleppo, Russell built a good relationship with the local pasha, the city’s governor, such that he was granted the right to wear a turban, something few Europeans were awarded. The pasha even sent gifts to Russell’s father back in Scotland.

Russell’s half-brother, Patrick Russell, another doctor, joined him in Aleppo in 1750 and took over Alexander’s practice when he returned to Britain in the mid-1750s.

Patrick was also given the right to wear a turban and would stay in the city until 1771. He was succeeded as unofficial physician to Aleppo’s company agency by another Edinburgh-educated doctor, Adam Freer.

The Russell brothers also brought local knowledge back with them to Britain, publishing a paper in 1768 on how the Bedouin used inoculation to protect against smallpox, long before Edward Jenner’s famous invention of a smallpox vaccine in 1796.

The pair were not the only Scots in Aleppo. From 1751-9, the local British consul in Aleppo was a former Greenock customs collector, Alexander Drummond, who also served as consul for Alexandretta, modern İskenderun in southern Turkey.

Consuls were agents charged with overseeing and assisting trade in their respective regions and reporting back to the British foreign office, often passing on political intelligence as well as economic, and were normally merchants themselves.

Alongside these duties, Drummond was a dedicated Freemason. He established the first Masonic Lodge in Aleppo on St Andrew’s Day 1747 and another in Alexandretta four years later. For this, he was made Provincial Grand Master of the Pour l’Orient Grand Lodge.

The better-known East India Company also had outposts in the Middle East. Donald Sandison, a merchant from Caithness, went to Istanbul in the 1810s to work for the East India Company. He was not the first in his family to go to Turkey. His brother was already there, working as a Levant Company agent in Izmir. Sandison married a local and raised a family in Istanbul before moving to further east in 1838.

That year, Sandison was appointed the first British consul for Bursa in north-west Turkey, a post he held until his death in 1868. In the role, Sandison worked to protect British merchants and to assist the smooth running of the silk trade, Bursa being a centre of silk manufacture, an important industry in Britain at the time.

READ MORE: Podcast to tell stories of remarkable Highland women

Another Scot, George Strachan, a Catholic exile from the Mearns, worked for the East India Company in Baghdad in Iraq and then Isfahan in modern Iran in the late 1610s and 1620s. His career there was not entirely successful, however.

Strachan soon fell out with the other Company staff in Isfahan. He was accused of murdering two of them and trying to poison several others and then hiding out in a local Carmelite monastery. He would later return to Europe and work in the Vatican library.

Working both within and outside of British institutions such the Levant Company and the East India Company, many Scots built lives for themselves in the Middle East, living in countries outside the growing British Empire.

Some, like Archibald Campbell brought new ideas and technologies with them while others, such as the Russell brothers, took local ideas back to Britain.