Gary rights protestors at Piazza Duomo in Milan | Giuseppe Ciuseppe/AFP via Getty Images Italian MPs back same-sex unions Vote came on the same day as Germany said it would annul anti-gay law.

The Italian parliament on Wednesday backed same-sex unions, becoming the last major Western democracy to recognize gay partnerships.

MPs voted by 369 to 193 with the government, meaning that the civil unions bill will become law. The bill had been pushed by Prime Minister Matteo Renzi, who wrote in a Facebook post: "Today is a day of celebration for many." Renzi had made Wednesday's parliamentary decision a vote of confidence on his leadership, and would have faced calls to resign if he had lost.

The issue has been highly controversial in Italy, with staunch opposition from Catholic conservatives, and the bill was watered down in order to secure the necessary support. A clause that would have enabled gay people to adopt their partner's children was dropped.

The Italian vote came on the same day as Germany said it will annul the convictions of gay men under a law criminalizing homosexuality.

Justice Minister Heiko Maas said on Wednesday that he will overturn the convictions and compensation will be provided.

About 50,000 men were convicted between 1946 and 1969 under the law, which dates back to the 19th century and was zealously applied by the Nazis.

Homosexuality was decriminalized in Germany in 1969, but the law was on the statute books until 1994. It was "unconstitutional from the start," Maas said.

“The state is guilty, because it has made the lives of so many people difficult,” the minister said.