By Marc Snetiker
Updated November 18, 2015 at 12:00 PM EST

When writer-director Billy Ray decided to pursue an American version of El Secreto de Sus Ojos, the Argentinian thriller that earned the Oscar for Best Foreign Language Film in 2009, he had already assembled two major stars to lead the project — Nicole Kidman and12 Years a Slave standout Chiwetel Ejiofor. Ray had locked in Ejiofor to play a federal investigator drudging up a case from his past and Kidman as his supervisor, but the third role — a victim of great loss and a pivotal role in the story — found its way to Julia Roberts by sheer serendipity.

“We were looking for someone to play the character of Mitch Cobb, who was written for a man, and then we heard that Julia was looking for a part that she could disappear into, and so I said, ‘Well, what if we made Cobb a woman? She could disappear into that,’” Ray explains. The script showed up at Roberts’ door, and soon she and Ray met to discuss the project.

“I remember every second of that conversation,” says Ray with a laugh. “Imagine being me for a second, and you’re hoping to make this movie, and you know the difference that casting Julia Roberts could make to the movie on every level. And there you are, meeting her for lunch in Malibu one day. That’s a meeting that you really would like to go well.”

Fortunately, it did, and Ray recalls the familiarity and seriousness that washed over Roberts. The duo landed on a few changes to tailor the character to be a woman, which they spoke to EW about this summer, but the biggest change became the circumstances of the crime that sets Secret into motion: the discovery of a body. Roberts’ character (now a woman named Jess) discovers the body of her daughter, Caroline, in a dumpster. In the original film, the victim is a young man’s wife. The shocking discovery is arguably the film’s defining moment, and it’s a pivotal scene which even followed the director home.

“I kept myself buttoned up pretty tight on that day, and then I went home and started to talk to my wife about what Julia had just done, and I completely broke into tears,” Ray recalls. “It was the first time it occurred to me that my own daughter was 18. I had shut off that part of my brain while we were shooting that scene. And it occurred to me that the actual reason that we need actors in the world is because they walk through emotions that are just too painful for us to walk through ourselves.”

To say the least, Ray is relieved that Roberts managed to twist his movie into something wholly different than his first draft (which, it should be noted, is itself a wildly slanted approach to the original Secreto, which took place in a brutal Argentinian police state of the ‘70s and ‘80s; Ray’s update is post-9/11 America in 2001).

“I’m keenly aware of the fact that it’s really self-congratulatory for any director to say, ‘Oh, she did something in my movie that she’s never done before,’ and I hate it when directors say that,” says Ray. “But in this case, it happens to be true. I don’t take a lot of credit for it. She just went to a place in this movie that I’ve never seen her go to before, and she was there day one, take one. Just dialed in in a way that was breathtaking for everybody on that set.”

Secret in Their Eyes opens in theaters today.

Secret in Their Eyes

  • Movie
  • PG-13
  • 111 minutes
  • Billy Ray