Poland's highest court, the Constitutional Tribunal on Tuesday overturned a law that would have led to the legal recognition of same-sex spouses who married in other EU member states and subsequently moved to Poland.

The government in Warsaw had been moving to accommodate a ruling from the Court of Justice of the European Union saying that majority-Catholic Poland, which does not permit same-sex marriage domestically, must at least recognize unions contracted elsewhere in the EU.

The unanimous ruling could set up a power struggle between Poland's top court and that of the 27-member bloc. What did Poland's Constitutional Tribunal rule?

The court said in a statement on Tuesday that the judgment was unanimous and final and that EU same-sex marriages could not be copied into the country's civil registry as previously planned.

It said that the plans for the "preparation and issuance of certified copies concerning unions contracted abroad that do not constitute a union between a woman and a man," were "inconsistent with Article 92, Paragraph 1, in conjunction with Article 18 of the Constitution of the Republic of Poland."