Spain's Constitutional Court on Tuesday ruled in favor of the nation's 2005 gay marriage law.

The Madrid-based El Pais reported that the 11-member court voted on an appeal filed by the conservative Popular Party (PP).

In an 8-3 vote, justices dismissed the appeal.

The PP filed the legal challenge to the law soon after Socialists approved it seven years ago. The PP returned to power in elections held late last year.

Leaders of the PP, including Prime Minister Mariano Rajoy, have said they would abide by the court's ruling. Supporters, however, worry that the government will make an attempt to roll back the legislation.

Seventeen days after Spain legalized gay nuptials, Canada followed suit. The Netherlands and Belgium approved similar laws before Spain.

More than 22,000 gay and lesbian couples have married since such unions became legal in Spain.

(Related: Spain's Jose Zapatero says he's proudest of gay marriage on his way out.)