Brad Lander boasts of spending two decades working in the trenches as a community activist in his Brooklyn neighborhood before winning races for City Council and even comptroller.

But even Lander knows many New Yorkers, including plenty in the NY-10 district where he hopes to unseat Rep. Dan Goldman, only first took note of him when he embraced Zohran Mamdani in a feel-good moment that shook up the ranked-choice mayoral primary.

“Politics is a team sport, and it doesn’t have to be a sour ego trip that many candidates make it out to be,” Lander told the Daily News. “There was something very important about a Jewish New Yorker and a Muslim New Yorker standing together.”

“Zohran built an incredibly inspirational campaign in a dark time,” he added, “and I’m proud to have played a part in that even if I wasn’t the one who won the election.”

Just four days after the unusual Mamdani cross-endorsement last spring, Lander grabbed headlines again when Immigration and Customs Enforcement agents arrested him while he tried to protect an undocumented immigrant from being detained at a court hearing.

“I didn’t plan to get arrested, but I’m proud to have stood up to Trump,” Lander said. “It’s the kind of work I’ve been doing for a long time, trying to make our city a better place for everyone.”

Lander, 56, calls the ICE arrest, for which he was found not guilty at a bench trial earlier this week, a badge of honor. He says the two events speak volumes about his campaign for Congress, which he frames as an insurgent battle to bring a fighting New York activist spirit to Capitol Hill.

The mild-mannered married dad of two young adult children ticks off a laundry list of advocacy and policy achievements, especially affordable housing, tenants and workers rights, racial justice and improving public schools, like the ones his kids attended in Park Slope.

“It’s about being Mr. Rogers with a steel spine,” he said, pointing to an introductory campaign video. “I’m not afraid to take on bullies like private equity landlords, Uber and, yes, Trump.”

Polls show Lander leading Goldman, a two-term incumbent who has the backing of Gov. Hochul, Rep. Hakeem Jeffries and some prominent unions, in the June 23 primary for the district spanning parts of lower Manhattan and a chunk of Brooklyn.

Lander vows to hold ICE’s feet to the fire and be an outspoken thorn in Trump’s side if voters help him unseat Goldman in the deep-blue district.

“This is a five alarm fire and establishment Democrats aren’t able to put it out,” he said. “I’ll bring that fight.”