ROME — Six years ago, Andrea Rubera married his partner in Canada, where the couple later became parents of three young children. But when they returned to their native Italy, a transformation occurred. Rubera suddenly became a single man, and his legally recognized husband in Canada became his single male roommate in Italy. Italian law also divided custody of their children.

The family’s journey brought to life the wide divide between Italy and most of the rest of the Western world on civil rights for gays and lesbians. Like Canada, nearly every Western country has legalized same-sex marriage or some form of civil union. Italy is the outlier, partly because of the lingering influence of the Roman Catholic Church.

But on Thursday, after months of delays and political jousting, the Italian Senate will begin voting on legislation to legalize civil unions, several years after a similar effort failed. The outcome remains uncertain, as lawmakers confront an issue that has challenged traditional social mores, jumbled ideological lines, and is being debated as the politics of the Catholic Church are in upheaval.

“Certainly, the fact that it was not going to be an easy vote was something we were aware of,” said Monica Cirinnà, the senator sponsoring the legislation.

The legislation initially seemed headed for fairly smooth passage. Many Italian cities, including Rome, already offer civil union certifications, though they are mostly symbolic.

Prime Minister Matteo Renzi endorsed the national legislation and predicted that it would be passed in 2015. Some opposition political leaders, including former Prime Minister Silvio Berlusconi, suggested they would support it. But any such certainty has since dissolved; Berlusconi has softened his position by saying lawmakers in his center-right party Forza Italia should vote their conscience.

Renzi has maintained his support, yet also acknowledged that civil unions are a delicate issue that divides his own center-left Democratic Party and presents a challenge for his governing coalition, since the coalition’s minority partner is the conservative New Center Right party, which largely opposes the bill.

“We are the only European country without a norm on civil unions, and we want to fill the gap,” Renzi said last week, predicting passage. “I only hope that the debate, in the next days, will stay serious and focused on the merits without becoming an ideological clash.”

But an ideological clash is probably unavoidable. Advocates and critics of the legislation are planning competing rallies in the coming days. Critics have attacked the bill on different grounds, with some arguing it would violate the Italian Constitution by equating civil unions to marriage, while others have opposed a so-called stepchild adoption provision. This allows a gay couple to adopt a child as long as one of the partners is the biological parent of the child.

Advocates of the provision say it would remedy glaring legal problems facing many gay couples, especially those who became parents through surrogacy. Italian law now recognizes only the spouse with biological ties to a child as a legal parent. This also means that the children have no legal rights to property and other benefits from the other parent.

“There are major injustices coming from this, all toward the kids,” Rubera said. “We are dreaming to be recognized as we are — as a family.”

Critics contend that the stepchild adoption provision is a “Trojan horse” that could undermine Italy’s prohibition of surrogacy. Gay rights advocates dispute this argument, noting that the majority of couples who leave Italy to pursue surrogacy are heterosexual.

Yet the issue seems to have weakened public support for civil unions. Different polls show that support for same-sex civil unions has dropped to 46 percent in January, compared with 67 percent in May. A poll conducted in January by IPR, an independent polling and marketing firm, also found that only 15 percent of respondents supported stepchild adoption for gay couples.

Dr. Gian Luigi Gigli, a physician and member of the Italian lower house who is against the legislation, said many opponents do not want to discriminate against gays and lesbians, but found the bill too far-reaching, especially on the stepchild adoption provision.

“There is an increasing opposition,” Gigli said.

In the past, the Catholic Church would probably have played a major role in opposing the legislation (as happened in France, where Catholic groups tried in vain to prevent passage of the country’s same-sex marriage law in 2013). But in promoting a more merciful, tolerant tone, Pope Francis has discouraged bishops around the world from diving into culture war issues that have alienated some faithful from the Church.

This has created a divide within the Italian Episcopal Conference as Cardinal Angelo Bagnasco, president of the conference, has encouraged Catholics to join opponents of the legislation at an upcoming “Family Day” rally. Supporters of the bill held rallies across Italy over the weekend. Yet the conference’s secretary-general, Monsignor Nunzio Galantino — who was appointed directly by Francis — has been more cautious in directly aligning the Church in such a contentious fight.

In an interview, Galantino said he recognized that the government has the right to establish laws that prevent discrimination against all people, but that he opposes the current bill because he believes it equates civil unions with marriage and because of the clause allowing stepchild adoptions. He agreed that there were “different visions” within the Catholic Church on how to engage the debate, but noted that Francis had encouraged priests to “accompany people in the streets” and listen to all different positions.

Massimo Franco, a columnist for Corriere della Sera, a national newspaper, wrote recently that Francis apparently canceled a meeting with Bagnasco after the Italian prelate went public with his support for the opposition rally. In an interview, Franco said the stepchild adoption provision is causing genuine concern among many lawmakers, especially Catholics, which concerns the Renzi administration.

Initially, lawmakers were going to hold a secret ballot to vote on the stepchild adoption clause, but now it is unclear if that will happen. Franco said the stepchild provision might ultimately get stripped away, which would make it easier to pass a law on civil unions. He said enacting some sort of civil unions law is important to Renzi — who wants to show the rest of Europe and his supporters that he can push through tough reforms and legislation.

“He wants a result,” Franco said. “Any outcome is good for him at this point.”

Yet Italy is clearly under pressure. In July, the European Court of Human Rights found that Italy’s failure to recognize same-sex unions represented a violation of the European Convention on Human Rights. Plaintiffs also are challenging existing laws in Italian courts.

For lawmaker Cirinnà, the sponsor of the civil unions bill, passage is a matter of extending civil rights that have been blocked for too long.

“This is a moment to break the dam,” she said.

Gaia Pianigiani contributed reporting from Rome.