Republican candidate for governor Carl Paladino vowed to “oppose the homosexual agenda” in two public speeches with representatives of the Orthodox community, most of them chasidim, in Brooklyn on Sunday.

“Your community and other religious communities and pro-values communities can still band together to save societal values,” said Paladino, a businessman from Buffalo at a synagogue led by Rabbi Yechezkel Roth in 53rd Street in Borough Park. "Marriage should be between a man and a woman, pure and simple."

The remarks read in Borough Park by Paladino, who often speaks without prepared text, were written by Rabbi Yehuda Levin, an ardent opponent of gay rights and abortion and occasional New York political candidate, Rabbi Levin told The Jewish Week.

Rabbi Levin, who endorsed Paladino on September 21 at his synagogue in Flatbush, has become a trusted advisor to Paladino on the Orthodox community.

At a second stop in Brooklyn, K’hal Adas Kasho inWilliamsburg, Paladino blasted his opponent, Democrat Andrew Cuomo, for marching in the annual gay pride parade, saying he would not do so, and attacked school curricula that teach tolerance of gays.

“I don’t want [children] brainwashed into thinking homosexuality is an equal valid and successful option,” according to reports. Some media reported that a line that was in his prepared text, saying “there is nothing to be proud of in being a dysfunctional homosexual,” was in his prepared text but not delivered.

Rabbi Levin, who said Paladino edited the speeches personally, said he knew who had written the Williamsburg speech but was not at liberty to say.

“Politicians often have speechwriters and then the candidate looks [the speeches] over,” Rabbi Levin said in a phone interview on Sunday night. “There were several things he didn’t feel comfortable with.”

Coming at a time of heightened discussion of anti-gay bias after the suicide last month of a Rutger’s University student who was secretly taped in a sexual encounter by a roommate, who then streamed the video online, and following the arrest this weekend of nine gang members in the Bronx accused of torturing gay victims, Paladino’s remarks received national coverage, and were promptly denounced by Cuomo.

“Mr. Paladino’s statement displays a stunning homophobia and a glaring disregard for basic equality,” said his spokesman, Josh Vlasto.

A majority of state legislators voted against a gay-marriage proposal last year. Paladino has said he would uphold such a measure if it passed a state referendum by voters.

Brooklyn’s Orthodox community has become something of a battleground between the two candidates. Cuomo visited Williamsburg and Borough Park rebbes last Sunday and was warmly received by them.

The Borough Park speech also attacked a group of Orthodox Jews, without naming them, who had accused Paladino of anti-Semitism on the steps of City Hall on Sept. 20. That group, which included Assemblyman Dov Hikind, were angered by Paladino’s affirmation of comments by the Erie County supervisor attacking Assembly Sheldon Silver as an "anti-Christ." Paladino on Sunday said Hikind and the others never called him to hear his side of the story.

Paladino’s Borough Park speech also waded into a City Council race last year between Brad Lander and John Heyer for an open seat representing part of Borough Park. "You voted for John Heyer because some other power brokers and power seekers fooled you and your distinguished rabbis, Moshe Wolfson and Yaakov Perlow into thinking Heyer opposed all forms of same gender marriage," Paladino said, as soon on a YouTube video of the event. "They lied to you and the rabbis because he didn’t oppose the same gender marriage but I do."

Paladino drew applause in the crowded room when he said "parents should be given a choice about whether to send children to public or religious school [and] it’s only fair that the secular education of our children be covered [by taxpayers] wherever they choose to study." There was also applause when he vowed to veto spending by the state on abortions.

Rabbi Levin also escorted Paladino to the offices of two Orthodox weeklies, The Jewish Press and Hamodia on Sunday.