Left-leaning state Senators Gustavo Rivera of the Bronx, Robert Jackson of Upper Manhattan and Jabari Brisport of Brooklyn were all fighting for their political lives Tuesday, pitted against more moderate Democrats who had establishment support and, in some cases, were backed by outside spending.

“$1.4 million so far reported — it might be a little bit more — of dark money. Consistently lying about my record, lying about who I am,” Rivera said in an interview Wednesday. “It didn’t work.”

Rivera, Jackson and Brisport all their won their primaries Tuesday in a show of strength for the progressive wing of the party.

In the newly drawn 59th District, covering parts of Queens, Brooklyn and Manhattan, democratic socialist Kristen Gonzalez trounced the establishment candidate, former City Councilmember Elizabeth Crowley.

“Neighborhoods across Brooklyn, Queens and Manhattan elected a 27-year-old democratic socialist Latina,” she said.

State Sen. Michael Gianaris of Queens, the Democrat’s second highest-ranking member in the legislature’s upper house, endorsed several of Tuesday night’s winners.

“What you saw is progressive incumbents all over this city securing victories, even under the onslaught of millions of dollars in dark money trying to defeat them,” Gianaris said.

But Tuesday’s results may not translate into more progressive policy. That’s because the November general election could see Democrats in other parts of the state, including Long Island, lose their seats to Republicans.

On Wednesday, the state Senate Republican Campaign Committee launched ads focused on crime and bail reform.

Democrats say they’re not overly concerned. “We have a historically large majority, so it’s nice to have that cushion,” Gianaris said. “Our majority is not at all at risk.”

Other incumbent Senators in the city who survived primaries include Andrew Gounardes and Kevin Parker of Brooklyn, and Joseph Addabbo Jr. in Queens.

For Rivera, winning re-election will mean giving up his home, which was left out of the newly reconfigured 33rd district, which now extends into the northwest Bronx. He has until late next year to move.

“I’m not only not looking forward to giving up this apartment,” he said. “But I’m not looking forward to entering the rental market, which I know every day from the folks that come into my office how difficult it is.”