“Lucky Number Sleven” may be a 2006 release, one of the first to come from The Weinstein Company, but as writer Jason Smilovic explained during a recent Dallas interview, it took nearly a decade to reach the screen.

“I wrote it in 1997,” Smilovic said. “It was originally to be an exploration of bad luck–like a guy who, independent of any abilities, talents, whatnot, would walk around the street, and pianos would just fall out of the sky. He was just always staring up at the middle finger of God. I’d written a draft in, like, three days–ninety pages–at my mom’s house. I’d just graduated from college, and I’d really caught the fever for this story.

“And then I went back and read it, and it was wrong, it was off. There was this weird disconnect between the character and the circumstance. It just didn’t make sense–his response mechanism just seemed to be broken. So I went back. When I start writing something, I’m telling the characters what to do and how to behave, but hopefully I cross a threshold where they start telling me what to do–I start to divest myself personally from the process and just let them talk to each other. And this character really was saying that there was more to him than met the eye, and that I had to dig deeper.

“Then a friend of mine calls up…and he tells me this story about a guy who borrows all the money he can in the world from family, friends, boookmakers, loan sharks, and proceeds to bet it on a fixed horse race, and the race horse in question dies of a massive coronary at the starting-gate. And I became really intrigued with what could have been the aftermath of that story, and how to fill in the timeline and the gaps. So the second part of ‘Slevin’ was kind of born out of that.” He wrote the amplified script, Smilovic noted, “sitting in my apartment in Queens, dining off the 99-cent menu at Burger King and returning items after I got the total. I finished the script, and it sat in my desk for a long time. It was kind of relegated to paperweight status. The movie had been relegated to writing-sample status. The movie was never going to get made; it was going to be reduced to a calling card, and hopefully get me jobs as a writer.”

But the piece eventually found a patron in Robert Kravis, a development executive at the erstwhile Shooting Gallery studio, who made contact with it through Chuck Feuer, an intern there and a friend of Jason’s, in 1999. After Shooting Gallery went under, Kravis went to work at Miramax and pushed the project there, to no avail. He persevered, eventually getting the script in 2002 to Tyler Mitchell at FilmEngine and Chris Andrews, an agent at ICM who represented Ben Kingsley and was interested in having him participate in the project. Still, it would take another two years before Ascendant Pictures, an independent production company, secured the financing and Josh Harnett, who’d once turned down the lead, signed on.

“Robbie read the script,” Smilovic recalled, “and said ‘I’d very much like to get involved in this.’ And I said, ‘I’d very much like you to get involved with this script.’ I didn’t know anyone who knew anyone, and Robbie kind of became my umbilical cord to Hollywood. He championed the script, and became my collaborator, partner and friend. We met up with Tyler Mitchell at FilmEngine a couple of years later, and Robbie and Tyler just carried the torch. Tyler became the third partner in our company.”

After a pause, he added: “Needless to say, the emotional investment that we’ve all put into this movie! This movie’s outlived three of my girlfriends!”

The actual production side of the film happened more quickly, but no less fortuitously. Chris Andrews’s attachment of Kingsley to the project was, Smilovic said, like a dream come true. “When I wrote the script originally…and I was writing the role of The Rabbi, this neat kind of dichotomy, this strange dichotomy that’s at odds with itself–because on the one hand you have the rabbinical element and on the other you have the criminal element, which don’t really mesh that well together–and I was thinking about who could serve as my template, my blueprint, to sort of feed off of, and in Ben Kingsley you have the man who played Gandhi, but you also have the man who played Meyer Lansky.”

Hartnett’s reconsideration was equally important. “He has this boy next door, all American kind of aesthetic, but beneath the surface there’s a real existential quality to him, a real darkness and a real brooding,” Smilovic noted. “And it was really important that we had an actor who could work with both sides of that character with equal weight. Josh is just incredible. The first time we went to Josh, he passed. He said, ‘I’m not sure I get it–for me.’ And the second time we offered it to him, he said, ‘You know what? I got it.’ And we always knew he could do it, and it would be a benchmark role for him, something that really stood out in his career.”

The attachment of Paul McGuigan as director was also central. Smilovic said that he and McGuigan became real collaborators on the project. “Paul sees the movie and I hear the movie,” he said. “Paul is so deliberate in his intent. He’s clearly in control of the set and has an amazing presence, but you don’t realize until you actually see the pieces come together the way he’ll move the camera and the way that that action will be continued in the next scene, or the weight of the transitions. He’s always editing with the camera, with his mind, and sees the movie very clearly before anyone sees it at all. Nowadays everything is coverage, and so many of the performances lack in authenticity because they feel like they’re cobbled together. And if you watch ‘Slevin,’ the actors are really given the chance to perform and to really inhabit the space. And that takes a special director and a special actor.”

The good fortune of the “Slevin” company wasn’t over, though. Bruce Willis, who’d been involved in another project with McGuigan before the director departed it, got ahold of the script and offered himself for a key role. And while pre-production was ongoing in Montreal, Morgan Freeman signed on for another. “It was the perfect cherry on top,” Smilovic said. “They both came to us like manna from heaven.”

And so a movie that had begun as a story about a completely unlucky guy ended up being very lucky indeed.