The First Barbary War lasted until June 1805, but continuing tensions led to the Second Barbary War in 1815.

On the 31st March 1905, Kaiser Wilhelm II of Germany landed in the Moroccan city of Tangier and expressed his support for the Sultan’s independence from foreign powers.