Storyline
After a rooftop chase, where a fellow policeman falls to his death, San Francisco detective John "Scottie" Ferguson retires due to fear of heights and vertigo. Scottie tries to conquer his fear, but his ex-fiancée, underwear designer Marjorie 'Midge' Wood, says that another severe emotional shock may be the only cure.
Gavin Elster, an acquaintance from college, asks Scottie to follow his wife, Madeleine, claiming that she has been behaving strangely and her mental state is abnormal. Scottie reluctantly agrees and follows Madeleine to a florist where she buys a bouquet, to the Mission San Francisco de Asís and the grave of Carlotta Valdes (1831–1857) and to the Legion of Honor art museum where she gazes at the Portrait of Carlotta. He watches her enter the McKittrick Hotel, but upon investigating, she does not seem to be there.
A local historian explains that Carlotta Valdes committed suicide: she had been the mistress of a wealthy married man and bore his child; the otherwise childless man kept the child and cast Carlotta aside. Gavin reveals Carlotta (who he fears is possessing Madeleine) is Madeleine's great-grandmother, although Madeleine has no knowledge of this and does not remember the places she has visited. Scottie tails Madeleine to Fort Point and when she leaps into the bay, he rescues her.
The next day, Madeleine stops to deliver a letter of gratitude for Scottie, and they decide to spend the day together. They travel to Muir Woods and Cypress Point on 17-Mile Drive, where Madeleine runs down towards the ocean. Scottie grabs her and they embrace. The following day, Madeleine visits Scottie and recounts a nightmare. Scottie identifies its setting as Mission San Juan Bautista, the childhood home of Carlotta. He drives her there and they express their love for each other. Madeleine suddenly runs into the church and up the bell tower. Scottie, halted on the steps by his acrophobia, sees Madeleine plunge to her death.
The death is declared a suicide. Gavin does not fault Scottie, but Scottie breaks down, becomes clinically depressed and is sent to a sanatorium, almost catatonic. Following his release, Scottie frequents the places that Madeleine visited, often imagining that he sees her. One day, he notices a woman on the street who reminds him of Madeleine, despite her different appearance. Scottie follows her to her hotel room where she identifies herself as Judy Barton, from Salina, Kansas.
Judy has a flashback revealing that she was the person Scottie knew as "Madeleine Elster." She was impersonating Gavin's wife in an elaborate murder scheme. Judy drafts a letter to Scottie explaining her involvement: Gavin had deliberately taken advantage of Scottie's acrophobia to substitute his wife's freshly killed body in the apparent "suicide jump." However, Judy rips up the letter and continues the charade because she loves Scottie.
They begin seeing each other, but Scottie remains obsessed with "Madeleine." He asks Judy to change her clothes and dye her hair to resemble Madeleine. After Judy complies, hoping that they may finally find happiness together, he notices her wearing the necklace portrayed in Carlotta's painting. Scottie realizes the truth and insists on driving Judy back again to the Mission.
There, he tells her he must re-enact the event that led to his madness, admitting he now understands that "Madeleine" and Judy are the same person, and that Judy was Gavin's mistress before being cast aside, just as Carlotta was. Scotti