People celebrate in front of the rainbow-lit Auberge de Castille, the office of Prime Minister Joseph Muscat, after the Maltese parliament voted to legalize same-sex marriage on Malta on July 12. (Darrin Zammit Lupi/Reuters)

Six years after officially acknowledging that marriages might not last forever, Malta has become the European Union's 15th country to legalize same-sex marriage. The staunchly Roman Catholic island nation in the Mediterranean had long been one of the continent's most conservative — banning divorces until 2011.

But with Wednesday's nearly unanimous parliamentary vote to amend Malta's law, marriage is now no longer restricted to the union between a man and a woman. Back in 2014, the country already legalized same-sex civil unions and said it would also recognize same-same marriages from other countries.

“It's a historic vote. This shows that our democracy and society have reached a level of maturity and we can now say that we are all equal,” said Prime Minister Joseph Muscat. Since Muscat was voted into office in 2013, he has pursued a number of policy changes that have drawn praise from liberals and harsh condemnation from the Catholic Church.

The marriage vote is only the latest step that has turned the smallest E.U. member into an unlikely defender of at least some liberal values.

It now has some of the world's most progressive gender recognition laws and same-sex marriage legislation. But Malta is also among the 28-member European Union's most Catholic nations, with more than 95 percent of all residents saying in a 2012 Eurobarometer poll that they believe in God and Roman Catholicism remains Malta's official religion.

The influence of the church is fading, however. Although the Catholic Church opposed the legalization of same-sex marriage, only one member of parliament opposed the changes Wednesday.

Muscat may claim the vote as a success for his administration, but some believe that the transformation was triggered almost a decade ago when the nation joined the European Union. Muscat once opposed joining the bloc but has since become a staunch E.U. defender.

Fishing boats are moored in Marsaxlokk, Malta. (Suzanne Plunkett/Bloomberg News)

In recent years, Malta has increasingly opened up to the rest of the European Union in a development which has boosted its local economy. The nation has fewer than 500,000 inhabitants, but almost twice as many E.U. tourists visit the three inhabited islands that make up Malta annually. Few E.U. members feel more connected to the idea of Europe than the Maltese, according to a 2015 survey. A 2014 report by the Maltese Today Public Policy Institute think tank similarly concluded that the strong E.U. influence in recent years was increasingly shaping public opinion on the three islands.

“For a small island on the periphery of Europe, the most pervasive and far-reaching change has been wrought by the rich exchanges with Europe at every level — schoolchildren, teachers, students, workers, civil servants, diplomats, politicians, local government officials and more,” the report's authors wrote.

“These people have been exposed to new ideas, new thinking, often a new scale of doing things. The result is — and this is a positive conclusion shared by all those interviewed for the writing of this paper — that as a people we are far less insular, far more open, and less resistant to change than we were just ten years ago,” the think tank concluded. Malta joined the E.U. in 2004, three years after the Netherlands introduced same-sex marriage as the first of the European Union member states.

In June, Germany became the 14th nation in the European Union to allow same-sex marriages after Chancellor Angela Merkel dropped her years-long resistance.

Unlike Merkel, who is also the leader of the Christian Democratic Union party, Muscat has long advocated for a staunch separation between religion and state and has tried to restrict the influence of the Vatican on political affairs.

“The crucial point here is to recognize the realities that there are small communities that may not feel they have a bond with the Catholic religion,” Muscat said in 2013.

But there are limits. Abortion continues to be illegal on the island — under all circumstances.

Read more: 

Why Angela Merkel, known for embracing liberal values, voted against same-sex marriage