Hundreds of demonstrators have called on Israel’s new education minister to resign after the far-right politician said he supported gay conversion “therapy” and had even attempted it himself.

Ministers and other politicians also condemned Rafi Peretz, a former chief military rabbi who heads a religious nationalist party, who was asked by local Channel 12 news over the weekend whether he believed he could convert gay people to heterosexuality.

“I think you can,” he said. “I can tell you that I have a deep knowledge of education, and I have done it too.” He said he had once worked with a student who had told him he was gay, whom he had tried to help “understand himself well and then decide on his own”.

The prime minister, Benjamin Netanyahu, said he had spoken to Peretz, “who clarified his remarks and stressed the Israeli education system will continue to accept all of Israel’s children as they are”.

“The education minister’s remarks about the gay community are not acceptable and do not reflect the stance of the government I head,” he said in a statement.

The justice minister, Amir Ohana, the country’s first gay cabinet member, said: “Sexual orientation does not require therapy nor conversion. Preconceived notions and ignorance require therapy and conversion.”

Following the outcry, Peretz later said his words had been distorted. “I did not say I support conversion therapy,” he wrote on Facebook.

So-called conversion therapy has been widely discredited as unscientific and damaging. One recent survey found attempts to change someone’s sexual orientation led to high levels of mental health problems including suicide attempts, self-harm and eating disorders.

Stringent anti-discrimination laws protect lesbian, gay, bisexual and transgender people in Israel, and hard-fought efforts for equality mean gay people can serve openly in the military and have adoption rights.

Tel Aviv, where hundreds demonstrated against Peretz after his remarks were broadcast, boasts a global reputation as a gay-friendly travel destination and holds a popular annual Pride parade.

LGBT activists, however, warn against complacency when same-sex marriage remains illegal, and homophobia and transphobia are widespread, especially in sections of the country’s conservative Jewish and Muslim communities.

Netanyahu has publicly promoted LGBT rights while at the same time forging alliances with intolerant political factions. Last year he voted against surrogacy for gay fathers, a proposed law that had angered his ultra-Orthodox allies.

The prime minister brought Peretz’s Union of Right Wing Parties into his coalition after 9 April elections in an effort to form a majority government. The attempt ultimately failed, and a second round of voting is due in September.

Peretz, popular with Israeli settlers, has also been accused of anti-Arab racism and in the same interview called for Israel to annex the occupied West Bank but deny Palestinians the right to vote.

He caused a separate outrage this month over reported comments in which he compared intermarriage between Jews and non-Jews to a second Holocaust.

Demonstrators at the Tel Aviv protest carried signs calling him a “homophobic racist”.

Agence France-Presse contributed to this report