(ANGELOS TZORTZINIS/AFP/Getty)

Gay couples will now be able to foster children in Greece.

The groundbreaking legislation was passed by 161 votes to 103 on May 9.

It will enable same-sex partners who are in civil partnerships to become foster parents – though adoption is still off-limits for gay people.

Prime Minister Alexis Tsipras welcomed the result of the vote.

Syriza, his left-wing ruling party, supported the passing of the bill despite opposition from many in the junior coalition party, the right-wing Independent Greeks.

Tsipras said: “Fostering provides for the return of the child to its natural parents, who must retain contact with the child during its fostering time.

“It would not be an exaggeration to say that fostering is an act of altruism, solidarity, and service of those who choose it,” he added, according to the Athens-Macedonian News Agency.

Greece long lagged behind the rest of Europe in terms of LGBT rights, but has caught up somewhat in the past three years.

In 2015, Tsipras issued an unprecedented apology to the LGBT community – as he passed the law which gave same-sex couples legal recognition.

Speaking in Parliament after the vote, he said: “With the legalisation of civil partnership for same-sex couples, a cycle of backwardness and shame for the Greek state is closing.

“[It is one] of denial and marginalization of a large part of our fellow citizens, who were not allowed to live together with their partner and enjoying basic rights and which led the Greece to convictions by the European Court of Human Rights.”

Marriage equality has still not come to Greece, but other steps have been taken in the name of progress.

In 2016, the Parliament passed a law which expanded the rights of LGBT people, including ensuring equality in the workplace regardless of sexual orientation or gender identity.

And in 2017, lawmakers made it radically easier for transgender people to legally transition.

The new law removed the need for trans people in the country to undergo sterilisation in order to have their gender legally recognised.

The law affects anyone aged 17 and older, and children between the age of 15 and 17 also have access to the legal gender recognition process.

However, they still have to obtain a certificate from a medical council.

In addition, trans people still need to be single to access the process, possibly forcing some couples to divorce against their will.

And a judge has to decide if the person’s gender expression/presentation matches their gender marker before legal recognition is granted.