Doctor Who's sidekicks Amy Pond and Rory Williams get close to the ledge in their final scenes in the hit sci-fi show.
Viewers will see the pair, played by Karen Gillan and Arthur Darvill, on a rooftop high above the Manhattan streets as they prepare to say goodbye to the Timelord in Saturday's episode.
Show supremo Steven Moffat said the episode's final shot was inspired by Karen Gillan's first appearance two years ago.
Speaking at a Bafta screening in Cardiff, he said: "After showing Amelia Pond in the garden as a young girl in the Eleventh Hour, Karen's first episode, the final shot in Saturday's The Angels Take Manhattan is a punchline I have been waiting to tell for two-and-a-half years."
He said the pair's departure and eventual replacement by a new companion, played by Jenna-Louise Coleman, would be difficult for Matt Smith's character to deal with.
He said: "This weekend's episode is more devastating for the Doctor, at certain points he becomes useless and emotional. It was torment and hell trying to write the episode, I struggled for ages to work out a fitting ending and changed my mind until I finally got it right."