The “Sex and the City” gals still keep each other’s secrets.

Sarah Jessica Parker learned of her ex-costar Cynthia Nixon’s gubernatorial candidacy about a month before she announced it, the HBO legend said Friday during a Tribeca Talk with sportscaster and former tennis pro Mary Carillo. And while Parker said she hadn’t known her progressive pal had ambitions to unseat New York Gov. Andrew Cuomo, she brimmed with praise for Nixon.

“I was incredibly excited and proud of her. I think she’s already been good for the conversation. And I think this is what’s exciting about primaries, right, is that people can inspire an incumbent to reconsider a policy … or just have a robust conversation,” Parker said, alluding to Cuomo’s increasingly leftward policy shifts since Nixon declared her run. “She’s formidable; she’s incredibly bright; she’s really brave; she’s excited about this race. It’s challenging, but she seems enormously energized … I think a competitor is always good.”

Parker, 53, and Nixon, 52, go way back. The two became friends at age 11, Parker said, performing together on a record of “Little House in the Big Woods” and co-starring as sisters in a Movie of the Week. “We were literally … always up against each other for parts,” the actress-producer said. “She got most of them.”

Also read: Will Miranda Hobbes and ‘SATC’ help or hurt Cynthia Nixon’s run for governor?

Despite Nixon’s lack of governing experience, Parker played up her pal’s bonafides as a longtime activist. “She loves this city; she’s been involved in conversations about policy; it’s been really important to her for the last many years,” Parker said. “Education, public schools, housing — I mean, there’s a whole host of things that she has spent her time participating in advocacy. The subways, among many things that affect people in the city, but I think also the larger issues that are part of conversations that affect us here and upstate as well.”

Parker, fresh off a busy few days that included the launch of her ready-to-wear Gilt bridal collaboration and a lawsuit alleging she had failed to plug a jewelry line she’d been paid to promote, also dished about a very different New York story: her film “Blue Night,” which shot over just 16 days and premiered last week at Tribeca. The drama follows a jazz-pop singer (Parker) around the city as she grapples with a new brain tumor diagnosis.

“The movie is simply the next 24 hours as she contemplates this diagnosis and choices she’s made and regrets — and in a city that is both loving and combative and aggressive and comforting,” Parker said after showing a clip of her character, Vivienne, walking a New York street to disquieting string music. “She was wonderfully unfamiliar to me.”

Unfamiliar to Parker’s viewers, meanwhile, was her starring role on the HBO show “Divorce,” which just aired its second season. Her character, Frances — a stark contrast to beloved Carrie Bradshaw on “Sex and the City” — begins the series with an extramarital affair that prompts her bitter, protracted divorce. Upon the show’s premiere, Parker said, she was surprised at the extent to which people questioned Frances’ likability.

Also read: Cynthia Nixon is running for New York governor — here’s what attracts celebs like Caitlyn Jenner and The Rock

“I sort of was struck by it — and not without some emotional response to that — because I found that the reasons people were giving would not really be applied to a man,” Parker said. “So I didn’t worry about whether she was likable or not, because I liked her. And I thought she had a story to tell that is not unfamiliar to people.”

Parker tries to give female stories weight through her production company, Pretty Matches Productions, which is made up entirely of women. While that gender makeup wasn’t an intentional choice, Parker said, she was “excited” by the women she met while assembling her team — and continues to be informed by female experiences, both her own and other women’s. (Pretty Matches titles include “Divorce,” “Blue Night” and the senior beauty-pageant doc “Pretty Old.”)

“I think what we’re hoping to do is tell whole stories; stories about everybody. But we are keenly interested in women’s points of view in a story. We really try to look after her; how is her story being told, and trying to find stories that haven’t yet been told that should be told — that we feel are marginalized or overlooked,” Parker said. “We don’t spend a lot of time talking about the responsibility, but I know that we feel it and we like it. We’re happily burdened by wanting to do right by the female stories that we’re developing.”

The fashion icon, who posed at the step and repeat Friday toting a backpack and a book, said she also wants to elevate “global voices” through her publishing imprint, SJP for Hogarth. Her first release, a debut novel from Iowa Writers’ Workshop alum Fatima Farheen Mirza, centers on an Indian Muslim family navigating life in America.

“I want to help tell stories,” Parker said. “And, actually, I want to shepherd them out to the world and support them.”