Nearly 50 years after Frank Serpico exposed endemic corruption in the New York City Police Department, his name still divides people.

For some, especially those on the left, Serpico is a whistleblower — a brave loner who took on a sinister system. For law-and-order types and many an ex-cop, he’s a rat who, for the sake of “a few bad apples,” betrayed the men and women who risked their lives protecting New Yorkers from the urban chaos of the ’60s and ’70s.

And for film buffs, he’s the inspiration for “Serpico,” Sidney Lumet’s hard-edged 1973 movie that made Al Pacino a star.

So what does the name “Serpico” mean for the man himself?

At 81, he’s still figuring it out.

“People don’t know who Serpico was,” he says in “Frank Serpico,” a documentary making its NYC premiere Sunday at the Tribeca Film Festival. “For a long time I didn’t, either. People say, ‘Call Serpico — he’ll take care of it!’ Well, take care of it yourself.”

Written and directed by Antonino D’Ambrosio, “Frank Serpico” is a compelling psychological study of a plainclothes detective who, when he went public with corruption charges, became the most famous policeman in the world. And then one night in February 1971, his career ended when was shot in the face during a drug bust. Whether his fellow cops set him up remains a mysterious possibility, and the film casts doubt on the official follow-up investigation.

But as D’Ambrosio says, “Getting shot was not the worst part of what happened to Frank. It was living with the five years of terror and paranoia that came before the shooting [and after he went public with the corruption charges]. He put his head on the line. He stood for integrity and honor. But did it really change anything? He thinks about that all the time. The past is always present for him.”

Serpico is a wonderfully eccentric character. The movie follows him as he pokes around his old haunts in the West Village, where he lived in the ’60s when the neighborhood “wasn’t even on the grid,” as one of his old friends says in the movie.

While most cops went home to their wives and kids in the suburbs, Serpico preferred the company of aspiring artists, writers, actors, dancers and models. He loved the ballet and the opera, and hanging out in coffee shops in the Village discussing books on philosophy. Many of his friends had no idea he was a policeman until his name started appearing in the papers once the Knapp Commission began investigating his charges.

In a memorable scene in the documentary, Serpico revisits his old ground-floor apartment on Perry Street. It’s empty, and as he wanders around he seems to go back in time.

“That was an amazing moment,” says D’Ambrosio. “It’s Serpico performing the Serpico he was 45 years ago.” He laughs and adds: “Frank is not camera-shy.”

Having read Peter Maas’ best-selling book “Serpico,” which inspired Lumet’s movie, D’Ambrosio first came across the cop in the 1990s when he heard him speak at a City Council meeting addressing Mayor Guiliani’s controversial policing policies. D’Ambrosio wrote in his diary, “I will make the Frank Serpico movie one day.”

Twenty years later, he sent Serpico a short e-mail and received an invitation to visit the ex-policeman at his farm in upstate New York.

“He was a pretty reclusive guy,” D’Ambrosio says. “He’d turned down offers to make other movies over the years, including an offer from the Weinsteins. But it had been 40 years since the original movie, and I just thought he’d lived a whole other life that was worth exploring.”

While most of “Frank Serpico” takes place in the present, D’Ambrosio skillfully uses Lumet’s film as a sort of home movie from another era.

“The movie is a masterwork,” says D’Ambrosio. “And I think Al Pacino should get an award every year for doing Serpico. It’s incredible how well he captured him.”

Serpico himself is ambivalent about the Hollywood version of his life. As he says in the documentary, he showed up on the set one day while Lumet was filming a scene during which a cop stuck a suspect’s head in a toilet.

Serpico never saw anything like that on the job and yelled, “Cut.”

When he registered his objections, Lumet barred him from the set.

“Frank Serpico” plays April 23, 24, 26 and 29 at the Tribeca Film Festival.