At the top of the pyramid is, as the Doctor calls it, a "timey-wimey space beacon." River has sent a message outside their frozen time. "The Doctor is dying, please, please help." He's furious. Amy and Rory join them. "Just tell him!" Amy urges her. River says the "solar flares" aren't solar flares at all, but are actually the millions of responses volunteering to help the Doctor. The Doctor is still determined to die. She gives him an impassioned speech about how much the universe loves him and she loves him most of all. He and his terrible hair plead with her. "Billions will suffer and die," he says. "I'll suffer if I have to kill you," she says. "More than every living thing in the universe?" he asks. "Yes," is her simple and honest answer. The Doctor is frustrated. He lashes out at her parents. Rory's confused, so Amy explains: "We got married and had a kid and that's her." Heh.
The Doctor asks to be uncuffed. He takes off his bow tie, wraps one end around his hand and instructs River to do the same. He makes the parents of the bride repeat the phrase "I consent and gladly give." Thus married, the Doctor leans forward to whisper something in River's ear, telling her she must remember it and tell no one. River's face brightens with wonder. "I just told you my name," the Doctor says. "Now, there you go, River Song... Melody Pond. You're the woman who married me." He asks his new wife to help him end this and she agrees. They kiss and it's romantic and lovely and he doesn't act like she has cooties and now time is moving again. She shoots him as she's supposed to by the side of the lake. The pterodactyls vanish from London. The world rights itself.
River, fresh from her adventures with the Weeping Angels, pays a visit to her mother. Amy sits in her backyard, glasses of wine ready, having just witnessed the Doctor's death. She's also upset about killing Madame Kovarian, even though it was in a timeline that has now never happened. She wishes she could talk to the Doctor. River can't bear to see her mother in pain and tells her the Doctor isn't really dead. It wasn't his name that the lying liar whispered in River's ear. He had a plan all along. Rory walks into the scene just in time to see the ladies dancing and hugging. They quickly fill him in. "Are you sure?" he asks. "Of course I'm sure, I'm his wife," River says. Amy is delighted. "And I'm his... mother-in-law." Her delight gives way to queasiness at the realization.
A hooded figure brings Dorium back to the tomb. Dorium, even without seeing his face, knows it's the Doctor. "How did you escape?" he asks. Flashbacks fill in some of the gaping holes for us: The Doctor didn't really leave after the captain of the Tesselecta offered his help. And he didn't really whisper his name to River, but asked her to look into his eye, where his tiny miniaturized self was waving to her. In the tomb, he sheds the robe with a flourish. He wore the Tesselecta to his date with death. "Barely got singed in that boat," he says. The Doctor promises it's "time to step back into the shadows" after all his big, noisy adventures. Let the universe forget him for a while. Say, until Christmas. Dorium warns him that his fall at Trenzalore is still coming, but the Doctor seems none too worried. That's for a future season, for some poor writer to figure out at the last moment. Dorium also reminds him of that damned question, the one that can never be answered. "The question you've been running from all your life: Doctor who?" The Doctor gives the camera an enigmatic smile that takes us into the closing credits. His name must be a terrible secret, indeed. Like he's secretly a Kardashian and the universe will simply lose the will to exist after finding out.