Abd al-Wahid bin Masoud bin Muhammad al-Annuri isn’t the kind of name usually associated with Elizabethan portraiture, better known for its pallid, blank-faced English aristocrats. But in the autumn of 1600, Al‑Annuri, recently arrived in London as the ambassador of the Sa’adian ruler of Morocco Mulay Ahmed al-Mansur, sat for his portrait, the earliest surviving picture of a Muslim painted from life in England.

The painting is an enigma. Its painter and provenance are unknown prior to its appearance at a Christie’s sale in 1955, when it was bought, then sold to its current owner, the University of Birmingham’s Shakespeare Institute. It shows Al-Annuri dressed in a long black robe (or thawb) and white linen turban, with a richly decorated steel scimitar, a Maghreb nimcha (sword), hanging from his waist. His piercing gaze meets ours, challenging, confident, perhaps slightly amused. This is no humble black servant, but an ambassador – possibly a warrior – of stature on significant diplomatic business. The inscriptions on the portrait reveal as much. It is dated 1600, and shows his anglicised name and age (42) and his title (Legate of the King of Barbary to England).

Al-Annuri had landed in England in August leading a 16-man Moroccan delegation of merchants, translators and holy men to conclude a military alliance between the Protestant Tudors and Muslim Morocco against their common enemy, Catholic Spain. It was the culmination of 50 years of amicable Anglo-Moroccan relations that saw a thriving trade in Moroccan saltpetre (used to make gunpowder) and sugar (that played havoc with Queen Elizabeth’s teeth), in exchange for English cloth and munitions. It led to a cordial correspondence between Elizabeth and Al‑Mansur and the creation of London’s Barbary Company in 1585, which was soon shipping hundreds of tonnes of merchandise back and forth.

When Al-Annuri’s retinue rode into London in August 1600 he was accompanied by the city’s Barbary merchants, who gave them a house on the Strand where they stayed for nearly six months, to the fear and amazement of many Londoners. One wrote that they “are strangely attired and behavioured”. The city’s chronicler John Stow observed that they “killed all their own meat within their house” and “turn their faces eastward when they kill any thing; they use beads, and pray to Saints”. The gossipy diarist John Chamberlain thought it was “no small honour to us that nations so far remote, and every way different, should meet here to admire the glory and magnificence of our Queen”. Within weeks, Al‑Annuri was given audiences with the same queen, first at Nonsuch Palace and then Oatlands. There, he put forward a remarkable proposal: a military alliance between Muslim Morocco and Protestant England, in which they would “join forces against the King of Spain, their common foe and enemy” and reconquer Spain for Islam. Even more audaciously he proposed “they could also wrest the East and West Indies from the Spanish”, the first and last time that a Protestant–Muslim confederation was proposed to rule Latin America.

As Al-Annuri awaited the outcome of these negotiations in the final weeks of 1600, his portrait was painted to commemorate the imminent ratification of an Anglo-Moroccan alliance that would transform the balance of power in Europe. But it was not to be. Elizabeth discovered that Al-Annuri was a Morisco, a Spanish-born Muslim forcibly converted to Christianity who had found his way to Morocco and reverted. She tried to “turn” Al-Annuri by proposing he and his fellow Moriscos join the Protestant struggle against Spain. The offer seems to have caused a rebellion among the Moroccan delegation. Stow reported that Al-Annuri remained loyal to Al‑Mansur, but “poisoned their interpreter being born in Granada”, another Morisco, “because he commended the estate and bounty of England”. Talks broke down, and by February 1601 Al‑Annuri was back in Morocco. Two years later Elizabeth and Al-Mansur were dead, with England’s new king, James I, negotiating a peace deal with Spain that would end the need for an Anglo-Islamic alliance, consigning Al-Annuri’s embassy into an embarrassing historical footnote.

Facebook Twitter Pinterest Chiwetel Ejiofor as Othello, with Ewan McGregor as Iago, at the Donmar Warehouse, London, in 2007. Photograph: Robbie Jack/Corbis

But Al-Annuri was not the only person with whom Elizabeth was fostering relations. In the 1560s she wrote to the Persian Shi’a ruler, Shah Tahmasp, offering a commercial alliance between him and her newly formed Muscovy Company. Once Pope Pius V formally excommunicated her in 1570, Elizabeth was free to ignore the papal edicts forbidding Christian trade with Muslims, and by 1581 she had lodged an English ambassador in Constantinople, signed formal commercial treaties with the Ottomans and founded the Turkey Company (the forerunner of the Levant Company). She pursued extensive correspondence with Sultan Murad III and his mother over three decades, exchanging diplomatic gifts that included cloth, cosmetics, horse-drawn carriages and a clockwork organ. In one poignant act of religious retribution Elizabeth allowed lead stripped from deconsecrated Catholic churches to be shipped to Constantinople to make munitions, much to the indignation of the watching Spanish and Venetian ambassadors.

Both Sunni and Protestant authorities saw the benefits of pushing a strategic anti-Catholic alliance. Elizabeth addressed herself in letters to Murad as the “defender of the Christian faith against all kind of idolatries, of all that live among the Christians, and falsely profess the name of Christ”. In response the Turks wrote letters to the “Lutheran sect” in the Low Countries, encouraging them to rebel against the Spanish, suggesting they shared Islam’s rejection of idolatry and belief in the unmediated power of their holy books.

Elizabethan dramatists were quick to exploit the ambiguities and contradictions of such alliances. From the late 1580s, beginning with Marlowe’s Tamburlaine the Great, more than 60 plays were performed with Islamic characters, themes or settings. As the theological terms “Islam” and “Muslim” only appeared in English in the 17th century, characters defined by terms such as “Moors”, “Saracens”, “Turks” and “Persians” predominated in more than 40 plays performed in the 1590s. Shakespeare followed fashion by rehearsing one Moor, the evil Aaron in Titus Andronicus (c1594), followed by another, The Merchant of Venice’s noble suitor to Portia, the Prince of Morocco (1596).

Four years later, within just months of Al-Annuri’s public departure, Shakespeare began another play, this time with the Moor as its central character. The similarities to Al-Annuri are striking. Othello is a mercenary, invited into the heart of a Christian community to fight the infidel but who is eventually unceremoniously expelled. As with Al‑Annuri, his ethnicity and religion are obscure. Asked his story, he speaks: “Of being taken by the insolent foe / And sold to slavery; of my redemption thence / And portance in my traveller’s history.”

Shakespeare deliberately poses more problems here than he answers. Is Othello born a Muslim or a polytheistic Berber? Are the “insolent foe” the Turks? And does his slavery lead to a religious conversion prior to his Christian “redemption”? If Othello has converted from one religion to another, might he “turn” again? Al-Annuri’s slippery identity is a problem for diplomacy, enables Shakespeare to manipulate an audience’s ambivalent feelings towards a generation of Anglo-Islamic amity. It is neither horror nor admiration, but both simultaneously. As the play ends with Desdemona dead, Othello reminds the horrified Venetians: “… that in Aleppo once, / Where a malignant and a turbaned Turk / Beat a Venetian and traduced the state, / I took by th’ throat the circumcised dog / And smote him – thus!”

Othello is both the Moorish convert protecting the Venetian state, and the fearsome Turk, killing the “heresy” within him. The profound ambiguity towards Islam that Shakespeare exploits in Othello remains with us, and nowhere more graphically than in the play’s final reference to Moroccans, Turks and Christians meeting in today’s tragic symbol of the destruction of cosmopolitan multiculturalism, Aleppo.

• Jerry Brotton’s This Orient Isle: Elizabethan England and the Islamic World is published by Allen Lane.