As a producer on the film, Butler decided to tackle the vigilante role instead of the part he'd been set to play for two years.

[movie id="411771"]"Law Abiding Citizen"[/movie] is a shifty film, with characters you thought you could root for suddenly making you question your allegiances in a morally ambiguous world.

It was shifty for the movie's real-life stars too. Gerard Butler and [movieperson id="21681"]Jamie Foxx[/movieperson] actually switched roles before shooting began, as they both explained to MTV News a few weeks before the film's Friday release date.

Originally, Foxx was set to play Clyde Shelton, a family man whose life is shattered after his family is killed during a home invasion. Butler was lined up to play Nick Rice, a prosecutor who cuts a deal to send one killer to death row while setting his accomplice free. Shelton doesn't take kindly to this sort of legal justice and, he being a former super-agent type, decides to enact a bloody, explosion-heavy form of revenge on everyone who allowed it to happen.

"For two years, I was playing that role," explained Butler, whose production company spearheaded the film's development. "From when we got the script, I just looked at it and just always presumed I would be playing Nick Rice. But the more I thought about it, the more I thought, 'You know, it'd be kind of cool to try Clyde, to take on that role, something I'd never done before.' "

Foxx had already agreed to play Shelton, but when Butler asked if he'd like to switch, Foxx was game. After seeing Butler as a sword-swinging badass in "300," Foxx knew he was the right man for the role. "When I look at Gerard Butler and I see '300,' just as a dude, I'm like, 'I want to see him do some dude stuff. I want to see him blow up some stuff and beat up some stuff,' " Foxx said.

"I had the movie '300' playing in my trailer the entire time we were shooting," Foxx added with a laugh.

Check out everything we've got on "Law Abiding Citizen."

For breaking news, celebrity columns, humor and more — updated around the clock — visit MTVMoviesBlog.com.