A Jewish Brooklyn judicial candidate says she was robbed of victory when her Protestant opponent changed her name to Cohen to seem more kosher at the ballot box.

“It is deception,” Tehilah Berman, 49, told The Post of rival lawyer Caroline Piela’s legal name change to Caroline Cohen during a nasty race for Civil Court judge. “It was wrong to deceive the Jewish and non-Jewish public.

“Catering to religious groups is not proper in this democracy,” said Berman, an Orthodox Jew from Flatbush. “People should be proud of their religion and not make believe they are something else.”

In February the eventually victorious Democratic primary candidate changed her legal name from Caroline Helen Julia Piela to Caroline Cohen, records show.

The name Cohen is taken from her husband Steven Cohen, her high-school sweetheart. And though they married in 2006 and she was known socially and professionally as Caroline Piela-Cohen, she didn’t officially change her name to Cohen until just weeks before she announced her campaign.

Cohen, fresh off her primary win last week, insisted her name change was just an “administrative concern” and that she in no way attempted to misrepresent her identity.

“I honestly don’t think that was a consideration,” said Cohen. “I challenge anyone who would assert that people voted for me because my last name was Jewish to look at my ground game and look at my numbers.

“To the extent that I received support from the Orthodox community, it was because those folks saw who I am and what I did,” Cohen added.

“I know Tehilah Berman is an Orthodox woman, and I believe her name to be very identifiably Jewish, and Ms. Berman did not do nearly as well as I did.”

Piela, 38, who also lives in Flatbush, took 43 percent of the vote to Berman’s 14 percent. Two other candidates split the rest.

Cohen aggressively advertised in Brooklyn’s Jewish press, with one ad featuring the name “Cohen” in jumbo-sized capital letters, just above the Old Testament expression “Tzedek Tzedek Tirdof” — Hebrew for “justice, justice, shalt thou follow.”