Italy's Senate voted Thursday to grant legal recognition to civil unions, as the last holdout in Western Europe took a compromise step to give some rights to gay couples after a bitter, years-long battle.

Premier Matteo Renzi described the passage of the bill Thursday as "historic." But gay and lesbian groups denounced the watered-down legislation as a betrayal because Renzi's Democratic Party sacrificed a provision to allow gay adoption in order to ensure passage.

The legislation, which must still pass the lower Chamber of Deputies, is nevertheless significant for an overwhelmingly Roman Catholic country where the Vatican holds sway in politics and society, although Pope Francis remained conspicuously silent as debate raged in recent monthsThe bill passed 173-71, well over the threshold necessary.

After being stalled in parliament for years, the legislation was spurred on after the European Court of Human Rights condemned Italy last year for discriminating against gays. Ruling in favor of three homosexual couples, the court found that Italy had failed to provide gays with even the most basic rights owed to couples in stable relationships, including inheritance rights, and recommended civil union recognition.

The legislation stops far short of authorizing gay marriage, which was passed last year in predominantly Catholic Ireland and was legalized as well across the United States. Last-minute changes removed references to "faithfulness" in the relationship lest it be construed as equivalent to marriage, which the Catholic Church insists is a lifelong union between a man and woman.

More painful for the LGBT community was Renzi's decision earlier in the week to scrap the provision allowing gays to adopt the biological children of their partners. It was sacrificed to ensure support within Renzi's own Democratic Party, and even then Renzi put the bill up to a confidence vote to ensure passage -- a common tactic in Italian politics to ensure that the majority closes ranks.

"We are outraged, angry, disappointed," said Marilena Grassadonia, president of Rainbow Families, the Italian association of homosexual parents. "We can't believe that in 2016 ... in a country like Italy which is so proud to be part of this Europe, that it's possible to make a law on civil unions without considering children who should be protected as Italian citizens and discriminated minors," she told The Associated Press.

Defenders of the bill insisted that the legislation preserved the right of Italian judges to grant adoptions to gay partners on a case-by-case basis, as has been the practice to date.

"Thanks to this text, the magistrates can still interpret the law on adoptions in the interest of the child to have a stable and continual relationship" with the non-biological partner, said Anna Finocchiaro, the head of the Democrats in the Senate.

Given the risk that the whole law on civil unions might have failed had the so-called stepchild adoption provision remained, "this was a wise choice," she said.

The center-right claimed a victory for having whittled down the original text.

"We prevented an anthropological revolution against nature," exulted Angelino Alfano, the interior minister and head of the New Center-Right party.

Avvenire, the newspaper of the Italian bishops' conference, lamented in an editorial Thursday that Renzi had forced senators to choose between their consciences and the government.

"It would have been better to not so heavily condition the freedom of conscience of the senators who will vote (with a few announced exceptions) not because of their intimate conviction of the quality of the law but out of loyalty or not to a political judgment of Renzi's executive," Avvenire said.