One of Mayor de Blasio’s top political aides is quietly helping Democrat Justin Brannan in a south Brooklyn race for City Council — even though Brannan claims he’s independent of City Hall.

Mayoral aide Jon Paul Lupo has been spotted numerous times with Brannan at his campaign office and political in recent weeks, according to sources.

Brannan’s campaign spokeswoman downplayed Lupo as a volunteer, saying, “We’ve got hundreds of volunteers.”

Brannan used to work for the de Blasio administration before running to replace term-limited Council member Vincent Gentile.

But Brannan’s had to distance himself from his former employer in a district where Hizzoner isn’t so popular.

“I’m a guy who could stand up to Mayor de Blasio as an independent Democrat,” Brannan recently told the Courier Life.

Every Council seat takes on added importance this year because there will be a vote for a new speaker in January — and de Blasio hopes to influence the process by forming alliances with Council members who cast the ballots.

Lupo is the top mayoral liaison to the Council.

Brannan faces Republican John Quaglione.