The Portuguese had started their colonial empire in North Africa through the Conquest of Ceuta in 1415. They occupied nearby Tangier in 1471, completely unopposed, allowing the Portuguese Empire to use the Tangier harbor for military use in the Western Mediterranian. The inhabitants of Tangier benefitted by not being subject to the vagaries of competing warlords. De Meneses was appointed Governor of Tangier, a position a number of his ancestors had previously held from time to time over the previous 250 years, and assumed his post on 7 March 1656. By 1659, the warlord Tafileta had unified Morocco, except the ports occupied by Portugal, Spain and England. The Treaty of the Pyrenees in November 1659 specifically pledged that Louis XIV of France would withdraw support from Portugal under the House of Braganza, thus releasing more Spanish troops and ships to pursue the continuing Portuguese Restoration War. Portugal sought a modification of its successful centuries old alliance with England that counterbalanced the power of Spain and France. Negotiations for the marriage of Charles II of England to Catherine of Braganza required as part of the dowry for Portugal to transfer the port of Tangier and the island of Bombay to English control. The Portuguese government wanted to part with Tangier, though many within the country had reservations. The anchorage was not particularly safe for shipping; it would require significant financial resources to improve. Portugal, hard pressed in its war of independence from Spain could not afford to commit troops to the defence of Tangier while fighting Spain in the Iberian peninsula. Portugal had even offered Tangier to France in 1648 to try to solicit support against Spain. Portugal's ally England already maintained another North African port, so the balance of power in the Western Mediterranean for Portugal vis-a-vis England would not significantly diminish. The warlord Tafileta would continue to be denied control of Tangier, and Portuguese naval forces could be shifted to other theatres. However, cession of Tangier to England was not popular with the general public and with many in the army. Fernando de Meneses, as governor of Tangier, saw its potential long term benefit to Portugal, had an excellent relationship with the native militia, and a spy network that provided information to the Empire. He avoided complying with orders to make preliminary preparations for cession, so had to be replaced in 1661 by Luis de Almeida. After the evacuation of Tangier, the ability of Portugal to directly project sea power in the Mediterranean was completely impossible. English Tangier was held for 22 years before being reduced and abandoned by the English who used other ports to project sea power in the Mediterranean.