Welcoming the Constitutional Court ruling, Poland's prime minister said his eastern European country wanted to stay in the wealthy trade and political group it joined in 2004 but that each member state must be treated equally and with respect.
Warsaw has long been at odds with Brussels over democratic standards and the independence of its judiciary. But Thursday's ruling that parts of EU law are incompatible with the Polish constitution defies the legal order on which the union stands and put Warsaw and Brussels on a full collision course.
"We have to state clearly that this government in Poland is playing with fire," Luxembourg's minister for foreign affairs, Jean Asselborn, said on arrival for a meeting of EU ministers in Luxembourg.
"The primacy of European law is essential for the integration of Europe and living together in Europe. If this principle is broken, Europe as we know it, as it has been built with the Rome treaties, will cease to exist."
French European Affairs Minister Clément Beaune said the Polish Constitutional Tribunal's ruling was an attack on the EU that could lead to economic sanctions against Warsaw.
"It is most serious ... There is the de facto risk of an exit from the European Union," Beaune told BFM TV, adding that he did not want Poland to leave the bloc.
Poland's Law and Justice (PiS) party government says it has no plans for a "Polexit" and - unlike Britain before its Brexit referendum in 2016 - popular support for membership of the EU is high in Poland.
The Constitutional Tribunal took on the case after Prime Minister Mateusz Morawiecki asked it whether EU institutions could stop Poland from reorganising its judiciary.
"We want a community of respect and not a grouping of those who are equal and more equal. This is our community, our Union," Morawiecki said on Facebook, referring to the EU. "This is the kind of Union we want and that's the kind of Union we will create."
The executive European Commission said on Thursday the ruling raised serious concerns about the primacy of EU law. Officials in Brussels said the decision could lead to a drawn-out obstacle course of fines and legal cases against Warsaw.
(Additional reporting by Francesco Guarascio in Brussels and Dominique Vidalon in Paris, Writing by John Chalmers)