Kevin Spacey plays Jack Abramoff in ‘Casino Jack’

Kevin Spacey thought he understood Jack Abramoff — until he began visiting the disgraced lobbyist in prison.

“I read what everyone read about him, and then I started reaching out to him, and it was two different people,” Spacey recalled. “On the one hand he’s funny, almost comedian-like funny, and you can see how he owned a room. And then you look at what they said about him and he’s the devil incarnate. And then there’s the facts.”

Spacey plays the colorful, morally compromised lobbyist in “Casino Jack,” a film about the K Street scandal that will have its world premiere at the Toronto International Film Festival on Thursday, and is emerging as one of the festival’s hotter entries. It’s a switch for Spacey, who last inhabited a Washington figure in HBO’s “Recount,” where he played the very different role of Al Gore’s unassuming chief of staff, Ron Klain.

From the start, the right has lamented the casting of Spacey — a friend of Bill Clinton and an outspoken supporter of Democratic causes — as evidence of a liberal hatchet job.

But the actor says he came away with a nuanced view of the lobbyist that defies conventional liberal thinking.

“Abramoff wasn’t stealing money. Yes, he was doing underhanded things. But he wasn’t buying Swiss chalets and helicopters,” said the actor, nursing a tall cup of Starbucks coffee and carrying a bright-green BlackBerry at Toronto’s Windsor Arms hotel, where Clinton once held court at a world leaders forum.

“So then it’s like: OK, [Abramoff] is the greediest man on Earth who doesn’t have any self-interest. He was giving money away to build schools. He was giving so much money away he wasn’t even paying his mortgage.”

In 2005, Abramoff was charged with running a complex influence-peddling scheme involving Indian casinos. The scandal led to a prison term for Abramoff, the resignation of then-House majority leader Tom DeLay and egg on the face of the Bush administration.

Directed by George Hickenlooper (“Factory Girl,” the political documentary “Hick Town”) and written by Norman Snider (a Canadian screenwriter best known for the identical-twin thriller “Dead Ringers”), the movie concentrates on Abramoff’s high-flying days as a lobbyist and the ethics scandal that begins to envelop him.

Some of the film has unquestionably been fictionalized. Its linchpin scene has Abramoff pointing a finger back at the Senate committee investigating him and accusing them of engaging in their own compromised behavior in accepting campaign contributions from lobbyists. In reality, Abramoff took the 5th.

The film, in theaters this fall, is unrelated to the Alex Gibney documentary about Abramoff — with a similar title — released earlier this year.

Spacey and Hickenlooper met with Abramoff at the federal prison in Maryland numerous times before they began shooting. At first, the lobbyist tried to persuade them not to make the film. Then he tried to shape it.

Hickenlooper wound up sending Abramoff the script (to get around prison regulations, he reformatted it as a legal document). Abramoff responded with suggestions, in what is certainly one of the more unusual acts of note-giving on a Hollywood project.

“Jack feels really betrayed by President Bush,” Hickenlooper said of one of Abramoff’s reactions to the scandal. “His kids used to play in the Oval Office and then he’s saying he didn’t know him?”

(Abramoff gave Spacey a letter to pass on to Bill Clinton; Hickenlooper wouldn’t reveal its contents, although the mind dances with the possibilities. The director also recounted with a laugh that Abramoff also offered to give a friend of Hickenlooper’s — who was having legal troubles — advice on dealing with the FBI.)

Hickenlooper — a self-described political junkie whose brother John is the Democratic mayor of Denver and the frontrunner in the Colorado gubernatorial race — said he believes that the government made an example of Abramoff while avoiding systemic reform of the lobbying industry.

But he also believes the lobbyist himself represents a fundamental social problem. “Abramoff epitomizes what went south about the American spirit, where the culture of individualism has become the culture of avarice,” Hickenlooper said, adding with a politician’s flourish, “If we don’t do something, the republic is in danger of imploding.”

Abramoff is currently out of prison on a work-service program. The film could help him begin to rehabilitate his image.

“Once he’s done with his house arrest, he may decide to speak out about the lobbying industry,” Spacey said. “He’d be credible if he takes responsibility for what he did, which he has, and exposes the hypocrisy he was a part of.”