And to think it all started with Bennifer.

Like almost every actor, Affleck had always wanted to direct. But it was in 2003, when Affleck was romantically linked to Jennifer Lopez, that he decided to finally take the plunge. The movie Affleck and Lopez starred in together, “Gigli,” had come out to savage reviews and public ridicule, and the paparazzi’s interest in the couple’s engagement was obsessive, intrusive and constant.

“I just thought: ‘This is so gross. It’s destructive to my career, it’s destructive to my soul, to my everything, I want to escape this,’ ” Affleck recalled at the Toronto International Film Festival last month. “I thought, ‘I’ve been wanting to direct for so long, if there’s ever going to be a moment to take two years away from acting and shoot and release [a movie], this is the time.’ ”

A few years later, Affleck released “Gone Baby Gone” ,his adaptation of a Dennis Lehane novel that shocked critics and filmgoers alike with its astute sense of atmosphere, pacing and characterization. Affleck followed up that promising debut with “The Town” a crime thriller set, like “Gone Baby Gone,” in Boston near where he grew up that found Affleck upping his game as a filmmaker with a larger-scale story and explosive action. This week, he’ll come out with his third film, “Argo,” a political thriller that was an instant hit when it played the Telluride and Toronto film festivals.

“Argo,” based on the real-life story of a mission to rescue six American diplomats from Tehran at the height of the Iran hostage crisis in 1980, has earned plaudits not only as the kind of smart, classy good-story-well-told that Hollywood has otherwise bailed on in recent years, but also as a noteworthy advance for Affleck. He proves just as adept with geopolitics as with street crime and lowlifes, as capable of tricky emotional shifts as with drilling down into the tribal anthropology of his home town’s scruffier precincts. Tonally and technically more complex than anything he’s done, “Argo” is already garnering talk of Oscar nominations — not just for best picture, but also for Affleck as best director.

It’s hard to believe that film fans have a celebrity media feeding frenzy to thank for liberating a director whose taste, chops and unfussy visual approach recall the great naturalistic films of the 1970s.

“That span kind of saved my creative heart,” Affleck said, reflecting on the period between 2004 and 2006 when he was developing and directing “Gone Baby Gone.” “It kept me interested creatively in a business that was turning me off completely otherwise. And totally reinvigorated me and inspired me.” (During that time Affleck, now 40, also married actress Jennifer Garner, with whom he has three children.)

Affleck had directed before — in 1993, he directed a 16-minute show-biz-and-sexism spoof called “I Killed My Lesbian Wife, Hung Her on a Meat Hook, and Now I Have a Three-Picture Deal at Disney” — but, as he admits now, “I was not a particularly good director at all.” It was acting that had exerted a stronger pull on Affleck, who while growing up in Cambridge, Mass. — attending the same school as a kid named Matt Damon — began pursuing such kid-actor staples as commercials and PBS series.

In the 1990s, he joined the rep companies of such indie-film godfathers as Richard Linklater and especially Kevin Smith. Then, in 1997, he and Damon wrote and starred in “Good Will Hunting”, which earned the team a screenwriting Oscar. (They originally wanted to direct, as well, but backed off once Gus Van Sant signed on.) Soon, Affleck was bringing his square-jawed good looks and occasionally too-studied style to such audience favorites as “Shakespeare in Love” and “Changing Lanes” and such duds as “Daredevil” and the aforementioned Movie That Starts With a G.

But whether he was working on hits or bombs, Affleck was watching, learning and asking questions. “The smartest thing I ever did in my career, from a very young age, was turn every experience I had on a set into a film school,” he recalls. “I discovered early on that if you’re genuinely interested in what people do for a living, they’re happy to talk to you about it. . . . So I benefited from all this free advice from electricians, gaffers, grips, directors, cinematographers.”

While filming “Changing Lanes,” he says, director “Roger Michell taught me to cast the extras with as much care as you cast the lead in a movie. Gus Van Sant taught me . . . that not saying something to an actor can be as valuable as saying something. [Terrence] Malick, I just finished working with him, and I learned about the value of moving the camera on the Z-axis and backlight. Kevin Smith, you know, from him I learned that it can be a real collaborative experience, that people can be friends, it doesn’t have to be fraught or tense, but that in fact relaxation serves you most well.”

The “Argo” production, Affleck says, hewed to the relaxed template from its very beginning, when someone “handed me a great script,” he called producers George Clooney and Grant Heslov to make his pitch to direct and “off we went.” The film is something of a hybrid of genres: After a harrowingly authentic reenactment of Iranian revolutionaries storming the U.S. Embassy in Tehran, and a nerve-racking escape from the melee by six American diplomats, the story shifts to Washington, where CIA “exfiltration” expert Tony Mendez (Affleck) is tasked with extracting them from the Canadian ambassador’s residence, where they’re hiding out.

As happened in real life, Mendez dreams up a fake movie, allowing him to enter Iran as a location scout and leave with the Americans as phony crew members. After he enlists the help of two hilariously earnest old Hollywood hands, “Argo” briefly plays like a “Wag the Dog”-type satire before switching back to a tautly calibrated political thriller.

The radical tonal shift from thriller to comedy and back again “was the one thing I wasn’t sure would work,” Affleck says now. “Because if you start to pick at the fabric of the realism of the movie for the sake of making jokes, you’ve basically compromised the entire third act. . . . I thought it was a real directing challenge, [but] it turned out it was actually more of a casting challenge.” He wound up getting his first choices: Alan Arkin and John Goodman, “who are the kind of comic actors, at least in some films, who know how to be funny but always real.”

Affleck himself keeps it real — and low-key — in “Argo,” where he's almost unrecognizable under shaggy ’70s hair and a beard. He’ll be seen next year in Malick’s romantic reverie, “To the Wonder,” as well as the crime drama “Runner, Runner.” He’s not sure what he’ll direct next, although he hopes that a Damon-Affleck movie about Boston crime boss Whitey Bulger comes to fruition. Whatever the project, it’s Affleck’s work behind the camera, not in front of it, that clearly holds the most promise for an already preternaturally charmed career — Bennifer included.


PHOTOS | Ben Affleck shines in front of and behind the camera

VIDEO | ‘Argo’ premieres in Los Angeles

TIMELINE | Affleck’s career throughout the years