Source plot synopsis — includes the ending
Petty crook Ugarte boasts to Rick of letters of transit obtained by murdering two German couriers. The papers allow the bearers to travel freely around German-occupied Europe and to neutral Portugal. Ugarte plans to sell them at the club and persuades Rick to hold them for him; however, Ugarte is arrested by the local police under Captain Louis Renault, the unabashedly corrupt prefect of police. Ugarte is killed while in custody without revealing that Rick has the letters.
Then, the reason for Rick's cynical nature—former lover Ilsa Lund—enters his establishment. Spotting Sam, Rick's friend and house pianist, Ilsa asks him to play "As Time Goes By". Rick storms over, furious that Sam disobeyed his order to never perform that song again; he is stunned to see Ilsa. She is accompanied by her husband, Victor Laszlo, a renowned fugitive Czechoslovak Resistance leader. A flashback reveals Ilsa left Rick without explanation when the couple were planning to flee as the German army neared Paris in 1940, embittering Rick. Laszlo and Ilsa need the letters to escape, while German Major Strasser is determined to prevent their departure.
When Laszlo makes inquiries, Signor Ferrari, an underworld figure and Rick's friendly business rival, divulges his suspicion that Rick has the letters. Laszlo returns to Rick's café that night and tries to buy them. Rick refuses to sell, telling Laszlo to ask his wife why. They are interrupted when Strasser leads a group of German officers in singing "Die Wacht am Rhein". Laszlo orders the house band to play "La Marseillaise", and Rick allows it. Patriotism grips the crowd and everyone joins in, drowning out the Germans. Afterwards, Strasser has Renault close the club on the flimsy pretext that he is “shocked” at casino gambling (as an employee hands Renault his winnings).
Later, Ilsa confronts Rick in the deserted café; when he refuses to give her the letters, she threatens him with a gun but then confesses she still loves him. She explains that when they met and fell in love in Paris, she believed her husband had been killed while attempting to escape from a concentration camp. When she learned that Laszlo was alive and in hiding, she left Rick without explanation to nurse her sick husband. Rick's bitterness dissolves. He agrees to help, letting Ilsa believe she will stay with him, while Laszlo leaves Casablanca. When Laszlo unexpectedly shows up, having narrowly escaped a police raid on a Resistance meeting, Rick has waiter Carl spirit Ilsa away. Aware of Rick's love for Ilsa, Lazlo tries to persuade him to use the letters to take her to safety.
When the police arrest Laszlo on a trumped-up charge, Rick persuades Renault to release him by promising to set Laszlo up for a much more serious crime: possession of the letters. To allay Renault's suspicions, Rick explains that he and Ilsa will use the letters to leave for America. When Renault tries to arrest Laszlo as arranged, however, Rick forces him at gunpoint to assist in their escape; however, Renault manages to tip off Strasser. At the last moment, Rick makes Ilsa board the plane to Lisbon with Laszlo, telling her that she would regret it if she stayed, "Maybe not today, maybe not tomorrow, but soon and for the rest of your life." Strasser drives up alone and attempts to stop the plane. He draws a gun on Rick, who shoots Strasser dead. When policemen arrive, Renault pauses, then orders them to "round up the usual suspects." He suggests to Rick that they join the Free French in Brazzaville. As they walk away into the fog, Rick says, "Louis, I think this is the beginning of a beautiful friendship."
Sources and content license
Source and revision history ↗ · Adapted from Wikipedia contributors, Casablanca (film). Section headings and formatting adjusted. · Content license