Anna Paquin as Lisa Cohen and Matt Damon as Mr. Aaron in MARGARET Photo by Myles Aronowitz (Myles Aronowitz)

Kenneth Lonergan made a memorably acclaimed directing debut in 2000 with the film “You Can Count on Me,” a deft, observant, funny-sad drama-comedy starring Laura Linney and Mark Ruffalo. The film, about a brother and sister reuniting after a period of estrangement, was nominated for two Oscars, landed on several critics’ top-10 lists and seemed to assure Lonergan — already a celebrated New York playwright — a long and happy career in the movie business.

Five years later, Lonergan was behind the camera again, on New York’s Upper West Side, with an urban coming-of-age drama called “Margaret.” He had reconvened many of his rep players from “You Can Count on Me,” including Ruffalo, Matthew Broderick, Kieran Culkin and Lonergan’s wife, J. Smith-Cameron. Anna Paquin had been cast in the film’s leading role, a 17-year-old high school student named Lisa whose life is upended after she witnesses a horrifying accident.

With such an accomplished ensemble of players; a textured, philosophically deep story about a young woman’s loss of innocence; and such high-powered executive producers as the late Sydney Pollack and Anthony Minghella, as well as the formidable Scott Rudin, Lonergan’s “Margaret” seemed on its way to becoming as admired a sophomore effort as “You Can Count on Me” had been a dazzling debut.

But, after the requisite months-long editing period, “Margaret’s” expected arrival at Sundance, Cannes or Telluride failed to materialize. One year, then two, then three went by, with no sign of the film on the horizon. Fox Searchlight, the studio that co-financed “Margaret,” kept mum on the subject.

In 2008, stories began to surface that Lonergan was having trouble finishing the film; in 2009, the Los Angeles Times reported that the project had “turned into a nightmarish production that has devolved into a bitter court fight,” the subject of not just one but two lawsuits. (According to the Times, Fox Searchlight sued producer Gary Gilbert for failing to pay half the production costs; Gilbert in turn sued both Searchlight and Lonergan, claiming they blocked his efforts to help finish the movie and forced him to pay for an “inferior and unmarketable” film.)

The good news is that “Margaret” has finally made it to theaters (it opens Friday at the West End Cinema). The bad news is that, because of ongoing legal action, Lonergan can’t speak in detail about why his film took so long to get here. “I just say it took a long time,” he said earlier this week, calling from his parked car in New York’s Greenwich Village. “It’s not a very interesting answer, but sometimes it takes a while for these things to get settled, and to get to a place where everyone’s happy.”

Although “Margaret” took seven years to make it to the screen, the story actually began more than 30 years ago, when Lonergan and Broderick were classmates at the Walden School, a progressive private high school on the Upper West Side that closed in the late 1980s. Many of “Margaret’s” most searing — and amusing — scenes take place in and around a fictionalized version of Walden, where Lisa and her classmates get into impassioned arguments about everything from the Middle East to “King Lear.” Broderick plays a mild-mannered English teacher and Matt Damon plays a hunky geometry teacher with whom Lisa develops a confiding relationship.

“All those class discussions are more or less based on real class discussions,” recalled Lonergan, 49. “Obviously not the one where they’re talking about the Iraq war. But all the encounters from the English class are based on real things. The scene where [Lisa and a friend] are smoking pot in Central Park and the English teacher walks by is based on something that happened to Matthew and myself in that exact same spot, on that same rock.” In the movie, it’s Broderick who plays the teacher who busts the kids. “That scene was tremendously fun to do,” Lonergan said.

The fact that “Margaret” is so strongly rooted in Lonergan’s experience may explain why Lisa’s journey — which takes her from the Upper West Side to a bus driver’s home in Brooklyn to a lawyer’s office in Midtown to a rapturous performance at the Metropolitan Opera — feels so authentic. Unlike conventional Hollywood movies, where so much of life is reduced to a quick montage or convenient dissolve, “Margaret” lets Lisa’s experiences play out in long, digressive sequences that admittedly slow the movie down but lend it a transfixing verisimilitude.

“It was written that way and conceived that way,” Lonergan said, explaining the unusual structure. In most movies, “they say, ‘I’m sorry, you have six months to live.’ And the person says, ‘Oh my God, that’s terrible.’ And they have a conversation and the person leaves the office. End of scene. That’s not what happens. You go in there, they give you terrible news and give you a barrage of details you can’t follow, but you have to make a decision without having the equipment to do so.

“I think a lot of us find ourselves in that type of situation over the course of a grown-up life. It’s very scary and tense and dramatic and interesting, and I don’t see why it can’t be used in drama just the way it unfolds in real life, or as close as I can get to real life.”

Having had diametrically different experiences on “You Can Count on Me” and “Margaret,” has Lonergan learned anything new about the difference between cinema and theater? (He’s directing a new production, “Medieval Play,” at New York’s Signature Theatre.) “I don’t have enough distance from ‘Margaret’ to know what I learned about movies from having made it,” he said with a sigh. “Movies are just so big. They’re very daunting. The crew is enormous, the cast is enormous, the schedule is tight, the technical elements are innumerable and, if you’re the writer-director, you’re the only person who’s there from inception until the very last minute. It’s quite interesting but overwhelming.

“What I really like best is writing, where I’m all by myself in a room.”

Still, coming out of that room has its compensations. When Lonergan was filming “Margaret,” Rudin pulled some strings and managed to get the production into the Met on two successive Sundays, when they filmed Christine Goerke singing an aria from “Norma” and Renee Fleming and Susan Graham singing from “Tales of Hoffman.” On-screen, the sequences are sublime, echoing the intensity of Lisa’s own self-dramatizing narrative and, in the film’s shattering climax, accompanying a crucial emotional pivot between Lisa and her mother, played by Smith-Cameron.

“The days we filmed those scenes and recorded the music were two of the most fun days I’ve ever had in my life,” Lonergan recalled. “We did a whole bunch of takes from a variety of angles, and after every single take, the crew burst into applause. And these are big, burly Teamster-type guys. Then filming Anna and J. watching the opera was . . . another example of watching two virtuosi doing things you can’t believe anyone can do. The amount of emotion they both had to draw on, not just for a couple of takes but all day, for eight hours — I’m very, very proud of that scene and very proud of them.

“You know, I’m not a natural lover of filmmaking,” he added. “I don’t like to get up early, I don’t like to be the boss of other people, I don't like working with a lot of people around me. But those days — I’ll never forget them.”



(149 minutes, at West End Cinema) is rated R for strong profanity, sexuality, some drug use and disturbing images.