Israel’s education minister has provoked a storm of anger by backing “gay conversion therapy”, a discredited technique that seeks to turn people heterosexual.

Rafi Peretz said it could work and that he had even performed it.

“I think that it is possible to convert [someone’s sexual orientation],” Mr Peretz said.

“I can tell you that I have deep familiarity on the issue of education, and I have also done this.”

Benjamin Netanyahu, the prime minister, condemned the remarks, saying they were unacceptable and did not represent his government’s position.

Best pictures from the 2018 Taipei Gay Pride March in Taiwan Show all 35 1 /35 Best pictures from the 2018 Taipei Gay Pride March in Taiwan Best pictures from the 2018 Taipei Gay Pride March in Taiwan Participants take part in the 2018 Taipei Gay Pride March in Taipei, Taiwan, 27 October 2018. AFP/Getty Images Best pictures from the 2018 Taipei Gay Pride March in Taiwan Thousands of people attended the march in Taipei, the capital of Taiwan. REUTERS Best pictures from the 2018 Taipei Gay Pride March in Taiwan Participants walk in the parade. REUTERS Best pictures from the 2018 Taipei Gay Pride March in Taiwan The march took place ahead of a landmark vote next month on LGBT+ rights in Taiwan. REUTERS Best pictures from the 2018 Taipei Gay Pride March in Taiwan On May 24 2017, the Constitutional Court in Taiwan ruled that same-sex couples have the right to marry in the state. AP Best pictures from the 2018 Taipei Gay Pride March in Taiwan After making its ruling on same-sex marriage in May last year, the court stated that its decision must be implemented in two years. AP Best pictures from the 2018 Taipei Gay Pride March in Taiwan On November 24, a public vote will be held in Taiwan on same-sex marriage. AFP/Getty Images Best pictures from the 2018 Taipei Gay Pride March in Taiwan A participant of the march poses next to a wedding studio. REUTERS Best pictures from the 2018 Taipei Gay Pride March in Taiwan A young woman from Chongqing in mainland China holds a fan reading "free writers" before the start of the march. AFP/Getty Images Best pictures from the 2018 Taipei Gay Pride March in Taiwan Participants with Pikachu-styled costumes pose as they gather at the square outside the presidential office for the start of the march. AFP/Getty Images Best pictures from the 2018 Taipei Gay Pride March in Taiwan Thousands took part in the parade in support of same-sex marriage. REUTERS Best pictures from the 2018 Taipei Gay Pride March in Taiwan Participants in the square outside the presidential office before the start of the parade. AFP/Getty Images Best pictures from the 2018 Taipei Gay Pride March in Taiwan A couple take part in the march with their baby. AFP/Getty Images Best pictures from the 2018 Taipei Gay Pride March in Taiwan Members of Tokyo Rainbow Pride walk in the parade. AFP/Getty Images Best pictures from the 2018 Taipei Gay Pride March in Taiwan The parade was awash with rainbow-coloured paraphernalia. AFP/Getty Images Best pictures from the 2018 Taipei Gay Pride March in Taiwan A participant of the march poses with a fan. AP Best pictures from the 2018 Taipei Gay Pride March in Taiwan A participant from Japan holds a banner before the start of the march. AFP/Getty Images Best pictures from the 2018 Taipei Gay Pride March in Taiwan Young women display rainbow flags. EPA Best pictures from the 2018 Taipei Gay Pride March in Taiwan A person taking part in the march waves a rainbow flag. EPA Best pictures from the 2018 Taipei Gay Pride March in Taiwan A man, decorated with balloons and a rainbow flag, takes part in the celebrations. EPA Best pictures from the 2018 Taipei Gay Pride March in Taiwan An American man and his Japanese partner, both wearing headbands saying 'Japan' in Japanese, kiss each other during the march. EPA Best pictures from the 2018 Taipei Gay Pride March in Taiwan Thousands of people attended the annual march. EPA Best pictures from the 2018 Taipei Gay Pride March in Taiwan Taiwan gay rights activist Chi Chia-wei attends the march. Chi became the first person in Taiwan to come out as gay on national television in 1986. EPA Best pictures from the 2018 Taipei Gay Pride March in Taiwan Participants take part in the march, organised by Taiwan LGBT Pride. AP Best pictures from the 2018 Taipei Gay Pride March in Taiwan Participants hold up a large rainbow flag. EPA Best pictures from the 2018 Taipei Gay Pride March in Taiwan People walking in the parade. EPA Best pictures from the 2018 Taipei Gay Pride March in Taiwan A person stands in front of a rainbow-coloured flag. EPA Best pictures from the 2018 Taipei Gay Pride March in Taiwan A Japanese couple hold a sign saying 'You Are My Safe Harbour' in Chinese. EPA Best pictures from the 2018 Taipei Gay Pride March in Taiwan A man, decorated with balloons and rainbow flags, takes part in the march. EPA Best pictures from the 2018 Taipei Gay Pride March in Taiwan The first Taiwan Pride march was held in 2003. EPA Best pictures from the 2018 Taipei Gay Pride March in Taiwan Participants display a huge rainbow flag during the 2018 Taipei Gay Pride March. EPA Best pictures from the 2018 Taipei Gay Pride March in Taiwan Two men take a selfie in front of a rainbow flag. EPA Best pictures from the 2018 Taipei Gay Pride March in Taiwan A man waves a rainbow flag during the march. EPA Best pictures from the 2018 Taipei Gay Pride March in Taiwan The annual Taipei Gay Pride March is the largest in East Asia. EPA Best pictures from the 2018 Taipei Gay Pride March in Taiwan The Rainbow City Symphonic Band performs during the march. EPA

Doctors say the technique, which tries to change someone’s sexual orientation through psychological and spiritual means and even electroshocks, is scientifically dubious and possibly dangerous.

Mr Peretz, an Orthodox rabbi who leads a small religious party, also drew condemnation from other politicians, gay groups and the public.

Amir Ohana, the justice minister, who is openly gay, said: “Sexual orientation does not require therapy nor conversion. Preconceived notions and ignorance require therapy and conversion.”

The Aguda, an LGBT+ rights group, called for Mr Peretz to resign.

Benny Gantz, head of the Blue and White party, the main opposition, said: “Any statements about conversion therapy cannot be legitimate in Israel in 2019. The Blue and White government will promote equality, tolerance and acceptance of the other.”

According to World Israel News, he added: “The right of every person to live according to his faith, opinion and inclination is a cornerstone of Israeli democracy and we will defend it with all our might.”

Mr Peretz described how he had acted when a gay person told him about his sexual inclinations.

“First of all, I embraced him. I said very warm things to him. I told him, ‘Let’s think. Let’s study. And let’s contemplate.’

“The objective is first of all for him to know himself well ... and then he will decide,” Mr Peretz said.

He later tried to clarify his comments, saying he did not mean gay children must be sent to conversion therapy, the Jerusalem Post reported.

Nitzan Horowitz, who leads the left-wing Meretz party, said the therapy was dangerous and risked leading young people to suicide.

Mr Peretz also provoked anger last week when he compared intermarriage between Jews and non-Jews to a “second Holocaust”.