The actor plays disgraced law man John Connolly, who masterminded the "unholy alliance" between his agency and notorious Boston, Massachusetts gangster James 'Whitey' Bulger in the 1970s - and then refused to testify against his childhood friend.

As a result, he was indicted on charges of alerting Bulger and his associates to investigations, falsifying FBI reports to cover their crimes, and accepting bribes. He was charged with additional racketeering-related offences and convicted in 2002 and sentenced to 10 years in federal prison.

In 2009 he was sentenced to a further 40 years in prison for second-degree murder. He's serving his time in Florida, where Edgerton was invited to visit him as he researched the role.

The actor says, "I felt like maybe it was a little unfair to go and visit him in federal prison and be like, 'Hey, you're staying here while I'm over here, making you look like a bad dude!' It just felt a bit like it wouldn't be a very genuine thing to do, knowing at some point we have to say, 'We're telling our fictionalised version or our true version of a true story. It might be not so nice to go and visit him.

"I would love to spend time with him and I'm sort of terrified of him, watching the movie and going on one hand, 'You got that guy to be me! And he did what? And he talks like what?'"

Instead, Edgerton met with "the ghosts of these stories", adding, "They would come knocking on our door. I spent a lot of time talking to a lot of people about John. We had a lot of FBI agents who were very opinionated about John.

"He held a very interesting place in the bureau in all of their minds as a bit of a peacock and somebody who was walking a high wire act between what they were doing and what Whitey and the guys were doing. Most of them presumed they were all doing the right thing and that John was dancing on the wrong side of the line. I feel a bit sad for him that he's the only one that really, really kind of fell down."