In the new thriller ''Argo,'' about a high-stakes rescue mission during the Iran hostage crisis, director-star Ben Affleck plays Tony Mendez, the real undercover CIA agent who pulled it off. The two recently sat down for a declassified conversation.

Ben Affleck has managed to pull off one hell of a second act. In 2007, with the gritty neo-noir Gone Baby Gone, he went from hit-and-miss leading man to promising director. His follow-up, 2010’s brilliant blue-collar heist flick The Town, made good on that promise — he was a real filmmaker, not some one-and-done dilettante. Now Affleck is about to release his most ambitious project yet, Argo. The tense thriller (rated R, out Oct. 12) tells the true story of how CIA agent Tony Mendez carried out a top secret operation that rescued six diplomats stranded in Tehran during the 1979 Iran hostage crisis.

In the film Affleck plays Mendez, who enlists the help of a Hollywood producer (Alan Arkin) and a makeup artist (John Goodman) to whisk the Americans out of Iran by having them pose as a film crew for a cheesy sci-fi epic called Argo that doesn’t actually exist. (The mission was finally declassified by President Clinton in 1997.) Although the story is set more than 30 years in the past, it feels timelier than ever with recent attacks on American embassies in the Middle East. Says Affleck, ”Even for a guy who spent more than a year telling a story about American diplomats in danger overseas, I was stunned when it happened again.” We sat down with Affleck and Mendez after Argo‘s premiere at the Toronto Film Festival — where it was anointed a serious Oscar contender — to discuss the journey from Langley to the Middle East to Tinseltown.

Tony, you spent your career in the shadows, and now, with Argo, you’re stepping into the light. How strange does it feel?

Tony Mendez I’ve spent my whole life trying to act boring. As an operative, you don’t want to be caught on camera. And here I am watching Ben on a big movie screen saying, ”My name is Tony Mendez.” That really was weird…. It’s a bag of different feelings. Some of it’s good, some of it is tough. The movie is so well-done that I felt exactly like I was back there. I was sweating. I lost my legs. It was hard to take.

Ben Affleck I told Tony he has to get used to the press asking about his love life. It’s going to be very invasive being on the cover of all of the tabloids.

Ben, after making The Town, were you looking to direct again right away?

Affleck I definitely wanted to direct. Warner Brothers said, ”Here, we want to send you this, we think this is the best script that we have.” I couldn’t believe how good it was, and I couldn’t believe they sent it to me. You could tell the writer, Chris Terrio, really spent time talking to Tony. And it’s a true story! It would have been a horrible movie if it wasn’t true, because nobody would believe any of it. Two months later, I flew out to D.C. and I met Tony at this famous spy bar.

Tell me about that.

Mendez I wanted to put Ben in this place where we skulked around in those days of yore. So we went to Chadwicks down on K Street. It’s a dark bar. It’s perfect. The claim to fame of the place is it’s where Aldrich Ames laid all of his secret documents on his KGB handlers.

Affleck Do you think that you were in that bar at any point when Ames was in there with his handler?

Mendez Oh, sure. Had to be.

Affleck Incredible. This guy was in the CIA — the real CIA, not the Hollywood made-up karate CIA! And he’s regaling me with all of these stories…I mean, you have to understand that this story that we made a movie out of is only one chapter in Tony’s career.

Tony, had you seen any of Ben’s movies before you met him?

Mendez Oh, definitely.

Who was more impressive to you, Ben or Argo producer George Clooney?

Mendez George isn’t that impressive.

Affleck [Laughs] If George was sitting here, Tony would say the opposite thing. That’s why he’s a good spy.

Ben, when you met Tony at Chadwicks, were you keeping an eye out for mannerisms to copy because you were going to be playing him in the movie?

Affleck Usually there’s that thing of: How does he hold his hands, what does his voice sound like? With Tony I wanted to know: What does his house look like, how long is he gone, what does that do to a marriage, what do you tell your kids, what do these offices really look like? It was important to show more than just a guy sliding down the roof, kicking in the window, and shooting it out.

Tony, the fake-movie-crew cover was so far-fetched and crazy. Was it frustrating for you to do something so miraculous and not be able to get any credit for it because it was classified?

Mendez It’s part of the job. We used to say if we weren’t doing this we’d be robbing banks. You end up with a twisted point of view. You feel more powerful sitting there remembering what you’ve done and not sharing it.

I don’t know. I’d want the world to know what I did.

Affleck I’m with you! You’re in the press, and I’m in Hollywood. We take credit any time we can!

Tony, you were an exfiltration expert and a master of disguise. How does one get into that line of work?

Mendez In my case it was just dumb luck. I learned how to do some of these things because the time was right. It was the Cold War and the Soviets were moving out into the Third World. If you were able to recruit one of their agents and have them bring in the crown jewels of intelligence, then you got some attention and they would let you do it again.

I think a lot of people will be surprised to learn how closely the CIA worked with Hollywood.

Mendez The events in Argo weren’t the first time. I was working with them routinely. If you look back to 1942, when we got our start in spying as the OSS [the precursor to the CIA], you’ll find documents that were created by Hollywood folks in a variety of subjects. For instance, I’ve got a copy of the OSS makeup kit, and it has all kinds of Hollywood tips on how to alter your look and identity. When we were working with Hollywood and it was going well we always said, ”We’re like brothers. We understand each other.”

Affleck I think the CIA could probably make better movies than Hollywood would make spies.

Ben, Argo is based on a true story, but it’s not a documentary. What percentage of it is how the mission actually happened?

Affleck It’s a trick question if I have to go first. I could be like, ”90,” and Tony could say, ”Nah, 25!” Who Tony is as a guy, what they did working with Hollywood and escaping is 100 percent true. I hope Tony thinks it’s pretty close to the truth.

Mendez I just wanted to make sure he didn’t have James Bond up there. I didn’t think he needed to change anything.

You got permission to shoot at CIA headquarters, which is pretty rare. Is that because you had a relationship with them from The Sum of All Fears?

Affleck I did have a relationship in the sense that I had been there and knew people there. But that was really meaningless. Tony’s story is what they responded to. He was one of them. Everybody knows Tony, and you can see in the way they look at him they have this respect and this deference.

Tony, were you ever on the set?

Affleck Tony’s in the movie! He was perusing the script seeing which part was going to work for him.

Mendez I was allowed to put a couple of family members in, too.

Was the Argo mission the hairiest of your career?

Mendez It was pretty close. There was also one with an Iranian official we had to get out of Iran. If he was found he would have been a dead man. We had to work on a disguise to get him through the airport. He’d been hiding in his grandmother’s attic underneath a tin roof for a month, and we went there and had to win him over. We had to go right through the teeth of his tormentors — the Revolutionary Guard. But we did it. It worked. If we got caught in that one, it would have been a lot bloodier than Argo.

Affleck That sounds like a good sequel. Good pitch, Tony.

Tony, if Argo gets an Oscar nomination, how would you feel about going to the Oscars?

Mendez How would I feel about it? Terrific.

That was the first time I saw your eyes light up during this interview.

Affleck Trust me, that’s as much as you’re gonna get.

Okay, that’s it. Thanks, guys.

Mendez Thank you. I read your magazine religiously.

Affleck Tony, tell the truth. You only read the Twilight covers.