Ismail bin Sharif had succeeded in creating a new state able to challenge European powers in North Africa, as well as the Ottoman Empire in present-day Algeria.
Following the occupation of the open country around Ceuta, the sultan's troops began to construct buildings and cultivate the land to sustain themselves.
In July 1695, during a dense fog – common at Ceuta in summer – the Moroccan troops made a surprise attack on the Spanish during a change of guard.
Those among the defenders who failed in crossing the drawbridge were killed in battle or when they jumped into the moat in an attempt to escape.
On 7 August of that year Prince George of Hesse-Darmstadt sent Juan Basset (a Spanish military commander supporting the Habsburg candidate Archduke Charles of Austria as successor to the Spanish throne) to Ceuta with part of the Anglo-Dutch fleet, calling on the city to surrender in the name of the Archduke with the promise that the siege would then be over.
The Marquis of Gironella, governor of the city, and the population refused to surrender to the Anglo-Dutch forces.
During the following years, the siege continued with little significant change until the arrival in 1720 of 16,000 soldiers under the command of the Marquis of Lede.
However, upon an outbreak of plague a few months later in 1721, the Marquis decided to leave the city, seeing no prospect of capturing Tetuán or Tangier.