In August of 1600, an Ambassador from the court of Barbary, Abd el-Ouahed ben Messaoud, arrived at the court of Queen Elizabeth I. He stayed in London for six months, during which time he met with the Queen on more than one occasion and was, according to contemporary accounts, the talk of London.
Three plays were performed at court by Shakespeare's company, the Lord Chamberlain's Men, during the time Abd el-Ouahed was in London. Shakespeare's company was occasionally called to court to perform for visiting dignitaries. The acting company performed at King James I's court for the Spanish ambassador in 1604, for example (at which time Othello and Measure for Measure were performed), so it's possible that the ambassador from the court of Barbary would have attended one or more performance by Shakespeare's company during his own visit. If so, Shakespeare might have met, or at the very least seen him there.
Othello was written in 1603 or 1604. There's very little doubt that Shakespeare modeled...
(The entire section contains 4 answers and 1099 words.)