Fez — In one photograph from November 1942, a jeep rolls off a landing boat at Fedala, the Moroccan port now called Mohammedia.

A few miles down the coast, an unfinished French battleship was firing from its berth in Casablanca. In California, Humphrey Bogart had already finished playing a nightclub owner in a Hollywood version of the same city. Warner Bros. expected to keep the film until spring.

What changed the studio’s plans happened in Morocco. On November 8, American forces landed on the Atlantic coast as part of Operation Torch, the Allied invasion of North Africa.

On November 26, New Yorkers bought tickets to “Casablanca.” The distance between the two events was 18 days.

The ship that fired from the pier

At 7:04 a.m. on the morning of the landings, the guns of the Jean Bart opened fire from Casablanca harbor. The French battleship still lacked the equipment of a finished vessel, but its main battery could reach American ships offshore. The French shore batteries at El Hank fired too. American warships returned fire.

A US Navy photograph taken on November 16 shows the Jean Bart still at the port, bearing the damage from shells and bombs. Ten days later, the name of that harbor city went up on a New York movie marquee.

The city sold the movie

Historian Meredith Hindley recounts the problem Warner Bros. thought it had that summer. The studio had shot Rick’s café in Burbank and built a love story around refugees desperate to leave wartime Casablanca. Now it had to sell American audiences a picture named for a place many of them would have struggled to find on a map.

The landings put Casablanca in newspapers and on the radio. Warner Bros. moved quickly enough to open the film in New York on Thanksgiving Day. Most American moviegoers still had to wait until January 23, 1943, when it opened nationwide.

One viewer caught it between those dates. Franklin D. Roosevelt watched Casablanca at the White House on New Year’s Eve. Nine days later, he left Washington for a wartime conference. His destination was Casablanca.