Operation Felix was the codename for a proposed German seizure of Gibraltar during World War II. It never got beyond the staff study stage, even though planning continued into 1944, primarily because of the reluctance of Spanish dictator Francisco Franco to commit Spain to enter the war on the Axis side.
Following the Fall of France in June 1940, Hermann Göring advised Adolf Hitler to occupy Spain and North Africa rather than invade the UK. As early as June 1940, before the armistice with France had been signed, General Heinz Guderian also argued for seizing Britain's strategically important naval base of Gibraltar. Guderian even urged Hitler to postpone the armistice so that he could rush on through Spain with two Panzer divisions, take Gibraltar, and then invade French North Africa. General Alfred Jodl, chief of Oberkommando der Wehrmacht (OKW) operations, presented Hitler with a formal plan to cut off Britain from its eastern empire by invading Spain, Gibraltar, North Africa, and the Suez Canal instead of invading the British Isles.
On 12 July 1940, the OKW set up a special group for the necessary planning. On 22 July, Admiral Wilhelm Canaris, the head of the Abwehr and an acknowledged expert on Spain, travelled with several other German officers to Madrid, Spain, where they held talks with Spanish ruler General Francisco Franco and General Juan Vigón, his Minister of War. They then travelled on to Algeciras, where they stayed some days to reconnoitre the approaches to Gibraltar, and returned to Germany with the conclusion that Franco's regime was reluctant to enter the war. However, it has since become known that Canaris was disloyal to Hitler and actually encouraged Franco not to join the Axis. Canaris' team did however determine that Gibraltar might be seized through an air-supported ground assault by at least two infantry regiments, three engineer battalions, and 12 artillery regiments. Canaris declared that without 380 mm (15 in) heavy assault cannon—which he knew were unavailable—Gibraltar could not be taken. When he reported to Field Marshal Wilhelm Keitel, he gave his personal opinion that even if Germany were able, with the cooperation of Spain, to seize Gibraltar, the British would land in Morocco and French West Africa.