VALLETTA, Malta — Lawmakers in Malta, a predominantly Roman Catholic country, voted to legalize same-sex marriage on Wednesday, joining much of Western Europe by replacing the traditional “you are now husband and wife” declaration in civil ceremonies with “you are now spouses.”

Only one lawmaker out of 67 in the Maltese Parliament voted against the legislation, signaling its broad support on the island nation despite opposition from the Catholic Church.

The lawmaker who opposed the legislation, Edwin Vassallo, cited his Catholic faith and its incompatibility with what he called a “morally unacceptable” law.

“As a Christian politician I cannot leave my conscience outside the door,” Mr. Vassallo said.

The Labor government had promised to introduce the bill as its first law after winning a second term last month. Both opposition parties supported it, ensuring its passage.