Participants wave Israeli and LGBT pride rainbow flags during Jerusalem's annual Gay Pride parade on August 2, 2018. - Thousands of people were expected to attend the parade in the holy city under heavy police guard, mindful of a fatal 2015 attack on marchers in the largely conservative city. This year's parade, the 17th annual Jerusalem march, is being held under the banner of "Pride and Tolerance". (Photo by Menahem KAHANA / AFP) (Photo credit should read MENAHEM KAHANA/AFP/Getty Images)

Around 30,000 people have attended the annual LGBT Pride in Jerusalem on Thursday.

This year’s Pride is believed to be one of the largest since the event first took place in 2002, but the celebrations are taking place in the shadow of a new law that prohibits gay men from surrogacy parenthood rights.

In July, hundreds of demonstrators gathered in Tel Aviv after legislation that would have allowed same-sex couples to have a child via surrogacy was voted down.

Prime Minister Benjamin Netanyahu voted against a clause to the surrogacy bill that would have extended eligibility to same-sex couples, which he had previously voiced support for.

The bill allows single women to be surrogates and previously it only allowed heterosexual married couples to use surrogacy.

The clause was proposed by MK Amir Ohana, an openly gay member of Netanyahu’s Likud party.

“Contrary to what was reported, I am entirely consistent on the issue of surrogacy. I support surrogacy for both mothers and fathers,” Netanyahu said in a statement.

“Today, we voted for the bill for mothers. I told MK Ohana in advance that I would not support his revision, as he has submitted to this bill, since it will topple this bill and then mothers would not receive surrogacy [rights].”

On Twitter, Netanyahu said he would support a clause allowing single fathers to be surrogates if it was put to the Knesset, Israel’s legislative body.

Following widespread anger from the LGBT community, the wife of the Israeli Prime Minister Sara Netanyahu defended her husband’s record on gay rights and insisted LGBT people have equality in Israel.

“I do not think they are not equal… I think our country is very advanced, and only continues to advance,” she said.

“Guys, have some patience. You have someone here who is thinking about you. I’m not elected, I’m not the head of state, but I can tell you that you are in his heart.”

Israeli religious leaders have actively participated in the surrogacy rights debate, with 200 rabbis signing a letter labelling gay people “perverts” who want to “destroy the concept of family.” Jerusalem’s Chief Rabbi has recently called for the city to remove rainbow flags from the vicinity of the city’s major Synagogues.

Thousands of police officials were deployed at the Pride march to protect participants from radical religious groups, following incidents of violence in previous years.

In 2015, 16-year-old Shira Banki was stabbed to death while she was marching in the parade by an ultra-Orthodox Jewish man, who also attacked several others.

The man, Yishai Schlissel, had previously served a ten-year sentence for a similar attack in 2005, and was jailed for life for the teenager’s murder.