A gay marriage law in Spain is threatened as the country swings hard to the right.

Mariano Rajoy and his conservative Popular Party (PP) are expected to win control of Parliament in a landslide on Sunday as Spain struggles under piles of debt and sky-high unemployment.

Socialists, who swept into office in 2004, legalized gay marriage over the objections of the Catholic Church and the PP, which filed a legal challenge to the law based on technical grounds.

Prime Minister Jose Luis Rodriguez Zapatero has called the law one of his government's greatest achievements.

“The best thing is that you can change things, and the lives of people,” he said on Los Desayunos de TVE. “I'll always remember, for example, that with the gay marriage law … There have been many, many gay people who have approached me and thanked me: 'Never forget, you've changed our lives, you've made us happy.'”

The 56-year-old Rajoy has previously said he believes the law is unconstitutional and that he would “change” it even if the nation's highest court ruled it constitutional.

“I will listen to the court, but I don't like the fact that there is gay marriage and I don't think it is constitutional,” he told daily El Pais. “What I don't like is the word 'marriage.'”

While repeal of the law seems doubtful, gay and lesbian couples in the country have taken the threat seriously. In the past several months, a sharp uptick in the number of couples marrying has been reported in the Spanish press.

Pope Benedict XVI has previously urged Roman Catholics to oppose Zapatero's socialist government and its liberal reforms, which include fast-track divorce and easier access to abortion.