Israel is considered a trailblazer when it comes to gay rights, but homosexuality remains taboo among the religious in the Jewish state

Israel's justice ministry said Sunday the government would advance legislation giving gay couples equal rights in adopting children following controversy over the issue.

Gay couples can currently adopt in Israel but they face legal and bureaucratic hurdles resulting in part from the wording of the law.

The Association of Israeli Gay Fathers had petitioned the supreme court demanding that the law, which currently names a "man and wife" as eligible adoptive parents, be changed.

At a July hearing, the welfare ministry opposed making the change, saying adopted children with gay parents would grow up burdened by the "difference" in their family setup.

Following a public uproar, the welfare ministry reevaluated its position.

On Sunday, it told the court that based on expert advice it has decided to support "cancelling the threshold condition of the relationship (of the adopting parents) being specifically between 'man and woman'", a statement read.

The justices gave the state until mid-2018 to draft a plan for changing it, a justice ministry spokeswoman said.

Its ruling cancels the association's petition but allows them to refile if the state does not keep its pledge.

The gay fathers' association welcomed the decision, pledging in a statement to "return to the court to demand justice, if it is delayed".

Last month, the same court said gay people should have the same right to become parents through surrogacy, giving the state six months to change the law.

Israel is considered a trailblazer when it comes to gay rights, but homosexuality remains taboo among the religious in the Jewish state.