Supporters of same-sex civil unions demonstrate in Rome, Feb. 24, 2016. Filippo Monteforte/AFP/Getty Images

Italy’s Parliament approved a bill Wednesday to allow same-sex civil unions in a long-awaited decision that has seen intense debate between the Roman Catholic Church and Prime Minister Matteo Renzi.

In order to avoid last-minute attempts to block or amend the bill, Renzi called a confidence vote in Italy’s lower house, saying it was “unacceptable to have any more delays after years of failed attempts,” The Local reported. Lawmakers voted 369-193 for the vote of confidence, meaning final approval of the bill will be automatic. The bill was expected to be finalized later on Wednesday.

“Today is a day of celebration for so many people. We are writing another important page of the Italy we want,” Renzi said Wednesday on Facebook. “It was no longer acceptable to have any more delays after years of failed attempts.” Many gay rights activists were excited by the bill. Before this week, Italy had been the last major Western country not to legally recognize same-sex partnerships. The bill gives same-sex couples many of the legal protections enjoyed by married couples, such as the ability to take each other’s names and receive a deceased partner’s pension. However, others are disappointed because the measure does not provide full equality for gay couples in all areas.

The Italian government used the same confidence vote strategy it used Wednesday to get the bill approved by the Senate, the country’s upper house, in February. But some protections and legal rights were taken out amid strong objections in the Senate.

An earlier draft included a provision that would have allowed gay couples to adopt their partners’ biological children, for example. This was included in a draft of the bill but was dropped during the debates over the bill, the Guardian reported, and judges will now have to decide about adoption on a case-by-case basis.

Previous attempts to legalize civil unions in Italy have failed, largely due to opposition from the Catholic Church, which wields significant power in the very religious country. While some are unhappy with the final product of this civil union bill, Renzi faced pressure from the European court of human rights to get something passed, according to the Guardian. Judges on the court ruled last year that Italy’s failure to recognize same-sex unions broke the country’s commitments under the European Convention on Human Rights.