Something stinks in Harlem — and at the Board of Elections.

In what critics claim is an extraordinary political deal, seven of the 10 commissioners on the city’s Board of Elections abstained in a vote to remove a politically-connected candidate, Larry Scott Blackmon, from the ballot — overruling their own lawyers and ignoring legal precedent.

The case involves the Feb. 14 special election to fill the Harlem City Council seat vacated by Inez Dickens, who won the state Assembly spot given up by Manhattan Democratic Party chairman Keith Wright.

Among the nine candidates is Blackmon, who is backed by Dickens and Wright.

But Blackmon made a big mistake — he submitted petitions to run under the banner of the “Harlem Family” Party while gathering petitions.

The board’s chief lawyer, Steven Richman, said the name violated the law because it sounded too similar to the Working Families Party, and could mislead voters to think Blackmon had the WFP’s support.

“This is not a curable defect,” Richman said. “There’s a potential for confusion and fraud.”

Candidates are barred from running under a partisan party banner in a non-partisan, special election.

The board’s staff then recommended yanking Blackmon from the ballot.

Board president Frederic Umane agreed.

“We have no wiggle room on this,” Umane said during the board meeting. “The case law was clear.”

Before even hearing Blackmon’s case last week, the board voted unanimously to toss another candidate, Mamadou Drame, off the ballot for using the flawed “Democratic Party” as his banner, citing its own rules and case law.

But moments later, the board members shockingly reversed course and ruled to keep Blackmon on the ballot after hearing arguments from the candidate’s election lawyer, Martin Connor.

Connor claimed the board could not unilaterally toss Blackmon because a voter had not filed a complaint to challenge his petitions. He said the board is a quasi-judicial agency, not a prosecutor.

“There’s no case or controversy here. No one challenged this,” Connor said.

Connor urged the ten board members to “abstain” from making a ruling — a move that would keep Blackmon on the ballot.

Seven of the ten board members did abstain, and only three voted to uphold the staff’s recommendation to remove Blackmon, including president, Umane. Six votes were needed to uphold the staff decision.

Rival candidates said the board ruling smacked of a double standard and suggested that Wright pressured board commissioners to side with Blackmon.

“It was extraordinary the Board of Elections would go against accepted precedent by reinstating Blackmon. It looks like a political deal to me,” Sarah Steiner, election lawyer for Harlem Council candidate Marvin Holland, said.

Manhattan GOP chairman Adele Malpass said, “This reeks of back-room deal-making. The Harlem machine got Blackmon back on the ballot.”

For his part, Wright denied that he used his influence with the board to save Blackmon’s candidacy. He said the accusations are coming from sore losers.

“I did not make any calls to anyone. I don’t have powers of persuasion. If I did I’d be at the White House with Donald Trump,” Wright said.

Connor, Blackmon’s lawyer, said he argued the case on the merits and did not speak to board commissioners before the vote.

A Blackmon campaign spokeswoman said “silly word games” shouldn’t take precedent over the will of the people.

“Fortunately, commissioners from both parties recognized this was ridiculous,” spokeswoman Maria Alvarado-Behl said. “The good news is now voters can decide the election, not the bureaucrats.”