If you saw director James Gray's thrilling "The Lost City of Z" this weekend, then you were undoubtedly blown away by the film's true-life story of obsession and Amazonian exploration and the finely calibrated performances of the cast (led by an impeccable Charlie Hunnam and Sienna Miller). But what might be the most dazzling thing about a movie almost exclusively filled with dazzling things is the final shot of the film.

(Spoiler warning, obviously.)

In the final moments of the film, Miller, who plays the wife of presumed-dead explorer Percy Fawcett, walks down the stairs of the stuffy Royal Geographic Society, and, as we glimpse in a hallway mirror, we're staring into the Amazonian jungle that took the life of her husband and child. It's a staggering shot, as subtle as it is complex, and when we sat down with Gray a few weeks ago to talk about the film, a large majority of that conversation was centered on this incredible shot.

You've had two movies back-to-back with amazing final shots. Can you talk about the shot and how you did it and the reasoning behind it?

In the case of "The Immigrant," that final shot, which I quite like, was always in the script. It was there from the beginning because it was a story about codependence. It's a love story that's never consummated thankfully and the worst people ever connecting but not connecting and I thought there you couldn't kill one of them off. So how do you put two people in the same frame walking away from each other?

But this ending I struggled with. I knew I wanted to end it on her. But I couldn't figure out a way to express that his obsession became her tragedy. So I struggled. You can't just cut in the Royal Geographic Society with the compass and all that. I thought about how we're going to deal with this. And the inspiration came from a weird source. I was watching an excellent movie, "The Boston Strangler," with Tony Curtis. And there's all this stuff at the end with Henry Fonda, and it's a psychoanalysis and he's talking about, "I don't know what I was doing, I was in a house." And it cuts to him in the house with Henry Fonda. I thought, Well that's interesting. He's combining two different spaces and all that. So right before filming I had scouted this Victorian house and there was this mirror so I thought she could walk off into the jungle, literally.

It was a very strange set because we had this Victorian house in Belfast and we created this long corridor. It was very funny to see these greens people coming in with huge palm trees and you're in the middle of Northern Ireland. It's very weird. I can't imagine what the neighbors thought. Then there was a visual effect at the end with the mountain and the sky because otherwise it looked too much like a greenhouse.

It was all about coming up, if I can use a pretentious term, a visual objective correlative for the narrative idea that the obsession was going to swallow her up. It was the literal visual correlative to that idea. I quite like the way it came out. It was a weirdly difficult shot to do because it involved correctly placing her in the mirror and getting the camera move right. Because she comes down and the camera booms down and there's something very counter-intuitive for the camera operator, because the camera has to move away from her and at a speed she isn't walking. It's harder than you'd think. Weirdly, the motion of the person always dictates the motion of the camera. I think that's take 24 that's in the movie.

Did it take some explaining?

I think, at first, she thought I was insane. But then I think she realized what it was. I remember I was playing Tosca, a piece from Tosca, it was a very grand thing. Music, it's an old quote of Stanislavski's, is the most direct path to the human heart. So you play that, and she got it. That whole day, which was shot the same day as the scene in the room with the compass, and her work was magnificent that day. She was so uncertain and wary and troubled, and I loved that it was a trance that she had to be in. She had that widow's catastrophe about her. It was a very strange day.

"The Lost City of Z" is now playing everywhere.