We open on Rick and Ilsa in Paris, where they are waiting for their visas to clear so they can fly to Casablanca and open an American-style saloon. To pass the time, Ilsa wanders into a meeting of the French Resistance where she is asked to pose as the wife of a man named Victor Laszlo, a compulsive gambler.
Circumstances of the war separate Rick and Ilsa but they are reunited in Casablanca, where Rick is a substitute piano player in the only saloon in town, which is owned by a fat man in a fez. Rick sees to it that Victor and Ilsa win at roulette. The French lieutenant in Casablanca, who is known to all as Louis, discovers Rick and Ilsa’s still-valid visas among a pile of sheet music in the fat man’s saloon during a singing of the Marseillaise. Needing to hide the visas from the Germans, Louis entrusts them to Victor Laszlo, a minor figure in the Resistance and a simpleton.
Rick plots to steal the visas and use them to buy the fat man’s saloon. Ilsa agrees to distract Louis while Rick goes to find Victor. To seduce Louis, she plays “As Times Goes By” on the piano in the saloon. They leave together.
Rick corners Victor in the saloon’s office and pulls a gun on him. Victor, a coward, immediately hands over the visas just as the German commander, looking to cash in his winnings from the roulette table, walks in. Without a moment’s hesitation, Rick shoots the German. Victor faints at the sight of blood on the commander’s uniform. Rick puts the gun in Victor’s hand and, after stealing the commander’s revolver, leaves to find Ilsa.
Louis has taken Ilsa to a bungalow by the airport. Ilsa deflects his advances and just when his impatience reaches its height, Rick appears at the door, pointing the German commander’s revolver at Louis. Knowing that the gun isn’t loaded — a confidence between soldiers imparted earlier at the roulette table — Louis becomes insouciant and begins to insult Rick and his taste in women. He tells Rick Ilsa is frigid and plays the piano poorly. Rick, blind with jealousy, turns on Ilsa, who defies him and says she’d rather die than marry a lousy piano player who looks terrible in a tux. Rick pulls the trigger but nothing happens. Louis pulls a gun out of a drawer and shoots Rick through the heart, his most vulnerable organ. The fat man emerges from the next room and Louis hands him the visas in return for the deed to the saloon.
Ilsa takes out a cigarette. The fat man lights it for her and offers her his arm. She takes it and they walk to the waiting airplane, which will take them back to Paris. Louis, now owner of the only saloon in Casablanca, continues to win frequently at roulette.