At last Ghailan was being recognised as Bey of Tangier
December 1661, The Hills outside Tangier, Ghailan, (Narrative History)
This piece of paper proved to the Alcaydes and Almocadans in what high esteem he was held by the Christian Princes.
He took the parchment from the messenger and examined the large ornate seal with some satisfaction. This man, Earl of Sandwich, who had brought his fleet from England and bombarded Algiers with heavy cannon-fire for several days, who had the temerity to destroy a Corsair fleet of the Sultan of the Ottoman Empire, who had sailed into Tangier Bay in the largest man-of-war Ghailan had ever seen, accompanied by a fleet of a dozen ships, was treating with him, Khadir Lakhdar Ghailan.
Respect from his own Berber cavila was assured the moment his father had named him heir to the government of Beniworsut, but his accession to his birth-right had been delayed by the rise of the treacherous Ben-Boucar who by assassinations and underhand dealings had assumed governance of the whole of Northern Morocco. Ali Ben Hamet, the man whose hand had actually murdered Haiashi, Ghailan's overlord, was installed as ruler of nearby Al Ksar and the young Ghailan was removed from his cavila to spend his early years in the court of Ben-Boucar being educated in the Koran.
He'd bided his time, learning the arts of diplomacy and war, and dedicating himself to becoming a highly skilled warrior. At the age of 23 years Ghailan had petitioned to return home to marry the daughter of a Beniworsut noble. Not long after his return his chance came when several nearby cavilas rose in revolt, refusing to pay Ben-Boucar's taxes they killed the local officials.
Ghailan had seized his opportunity. He summonsed a few trusted friends and galloped to Al Ksar. There he burst in on Ali Ben Hamet and butchered him despite his pleas for mercy – what mercy had he shown Haiashi? The citizens of the town lauded this honour killing and Ghailan's reputation soared. He was recognised as the natural and rightful leader and local Alarbes tribes rode to join him in rebellion against Ben-Boucar.
Ben-Boucar had responded with a large force, but Ghailan had been wise enough to resist open battle. He took to guerrilla tactics and whenever it looked as though he was likely to be trapped he had taken his small force and holed-up in Arzila, a coastal town with strong city walls. Without ships and artillery there was nothing Ben-Boucar could do to winkle Ghailan out of his safe retreat. Seeing he could never bring Ghailan to a decisive battle Ben-Boucar eventually offered to leave him as governor of Arzila and Beniworsut in return for the customary tributes.
Ghailan had gratefully accepted the deal. He knew the northern cavilas of the Gharb resented Ben-Boucar and given this breathing space he, Ghailan, he could subvert them all and rule the whole region.
He declared jihad against the European enclaves and rallied tribes by reminding them of the Battle of Three Kings where Moroccans had defeated mighty Portugal. Tribes flocked to his banner. His growing reputation made it easy to negotiate diplomatic marriages. He forged alliances with Angera – famed for their fierce warriors, and Tetuan – an influential cavila with a large army.
He had spent years training his men, transforming them from a disorganised rabble to a disciplined army capable of terrifying ferocious frontal charges or subtle ambushes requiring meticulous preparation, silent advances and patient concealment sometimes waiting days to spring the trap.
He had proved himself by leading many successful raids against the European Nazarenes and created an independent Gharb by defeating Ben-Boucar's attempts to retake control. As his successes had mounted he had gained more followers. Now he was recognised as ruler of twenty two cavilas with a total levy of twenty thousand troops. Such an army guaranteed his immunity to any retribution from Ben-Boucar – as long as he could maintain the loyalty of the cavilas and sufficient supplies for his army to ward off any attack from the Spanish or Portuguese.
Still the cavilas of the Rif Mountains had refused Ghailan's overlord-ship – and he did not have the knowledge or experience needed to subdue them or maintain control, nor had he been able to subvert Ben-Boucar's authority in wealthy Fez. That usurper still took every opportunity to wage war on Ghailan, considering him to have broken their agreement by expanding his sphere of influence.
To repel his Moroccan enemies Ghailan needed continuing supplies of arms and gunpowder, which he obtained by alternately attacking the enclaves and negotiating temporary truces which the Europeans bought with weapons and gunpowder; the truces also pleased the cavilas who could to sell their produce to the garrisons.
A New Opportunity
But recently his spies in Ceuta had reported the Spaniard occupiers were saying the English King was going to takeover Tangier from the Portuguese. The Spanish had previously inherited several enclaves from the Portuguese - Ceuta, Mellila and Salle. Ben-Boucar had managed to oust them from Salle, but the Spanish were keen to capture Tangier. They were waiting for the Portuguese to reduce their garrison in anticipation of the English takeover, and would attack Tangier from land and sea at its weakest before the English arrived.
Ghailan had sent messages through the Jews and with several renegades, offering to assist the Spanish to eject the Portuguese in return for gold and a regular supply of gunpowder. But he had now heard a large Dutch fleet was approaching the Straights and might well be prepared to outbid the Spanish.
Before he could act on any of this a man calling himself the Earl of Sandwich, who claimed to be acting on behalf of the King of England, had sailed into Tangier Bay and sent Ghailan this letter along with generous gifts, offering to negotiate a truce. The Jews informed him this Earl was well regarded by King Charles of England, and was probably sent to secure Tangier against the Spanish. His ships would be well provisioned with gunpowder and muskets and Ghailan might well persuade him to part with a worthwhile supply of both.
Sandwich's formal request for permission to cut fire-wood acknowledged Ghailan's sovereignty over the surrounding countryside. Ghailan would grant permission, but restrict the areas where the Earl's men could gather wood to further reinforce the Englishman's recognition of Ghailan's authority. In addition he would send a large force of lancers and foot soldiers to oversee the foraging party in order to impress the English with their numbers.
 The Journal of Edward Montague 1659 - 1665
 Barlow's Journal
All of the information about Ghailan's life comes from Lancelot Addison ‘Revolutions of the Kingdoms of Fez and Morocco' 1671.