The Spanish occupation of Tangier between 1940 and 1945 was a temporary enlargement of the Spanish Morocco during World War II.
During World War II, the Tangier International Zone was invaded and occupied by Francoist Spain.
On 14 June 1940, a few days after the Italian declaration of war after the German invasion of France, Spain seized the opportunity and, amid the collapse of the French Third Republic, a contingent of 4,000 Moorish soldiers based in the Spanish Morocco occupied the Tangier International Zone, meeting no resistance.
Historians claim that it was done with the excuse that it was a prevention of a possible Italian conquest of Tangier.
Despite the claim that the occupation was a "provisional" measure, the operation was the realization of a long-standing wish and prelude to a potential occupation of French Morocco that did not happen because Rabat ultimately rallied to the new Vichy regime. The Mendoub, the sultan's representative, was expelled in March 1941, further undermining French influence in Tangier's affairs.
Despite calls by the writer Rafael Sánchez Mazas and other Spanish nationalists to annex Tangier, the Franco regime publicly considered the occupation a temporary wartime measure. A diplomatic dispute between Britain and Spain over the latter's abolition of the city's international institutions in November 1940 led to a further guarantee of British rights and a Spanish promise not to fortify the area. In May 1944, although it had served as a contact point between him and the later Axis Powers during the Spanish Civil War, Franco expelled all German diplomats from the area.
Following the August 1945 Paris Conference on Tangier between the United Kingdom, France, the United States and the Soviet Union, an isolated Spain accepted the conditions lined up in the former on 19 September 1945 and retired from Tangier on 11 October 1945.
Tangier then returned to the pre-war status of an international zone.