WARSAW, Poland — Poland’s prime minister denied that his government wants to take Poland out of the European Union, or do a “Polexit,” saying Monday it was completely untrue and a “harmful myth.”

Mateusz Morawiecki was reacting to massive nationwide protests Sunday against government policy that critics say could cost Poland its EU membership. The protests were sparked by a top court’s ruling that the Polish Constitution has supremacy over EU law. But the case was initiated by Morawiecki who voiced doubts as to the supremacy of the EU’s laws.

But Morawiecki tweeted Monday that “Polexit” is “fake news.” He stressed that all of Poland’s obligations resulting from EU law “remain in force.”

The “Union is too serious a Community to be taken into the realm of fairly tales,” Morawiecki tweeted. “It is a place of mutual benefits, but also of real challenges to all the Union nations.”

Poland’s right-wing government has repeatedly clashed with the EU over its policies, mainly in the justice sector, and insists the 27-member bloc needs adjustments.

The head of Poland’s influential Catholic bishops’ conference that is supportive of the government, Archbishop Stanislaw Gadecki, told Vatican Radio in Rome that “we all want to stay in Europe” and that “no reasonable person wants to leave it.”

Authorities in Warsaw estimated participation in Sunday protests at up to 100,000. Protests were also held in many other cities.

Warsaw police said that four people were detained, including a nephew of Morawiecki who alleged that a police officer kicked him in the head while he was on the ground while being detained.

Warsaw police spokesman Sylwester Marczak confirmed the temporary detention of Franek Broda, with the use of handcuffs, but did not address allegations of police brutality. Broda, 18, is a government critic and a LGBT rights activist.

A few dozen people were fined for lighting flares and obstructing traffic during the protest and subsequent march to the headquarters of Poland’s ruling right-wing nationalist Law and Justice party.

Critics and opposition parties say the ruling by the constitutional court, where many judges are government loyalists, can be seen as a rejection of EU values and may potentially lead to Poland being forced out of the 27-member bloc.

Poland’s government has been in conflict with the EU for six years as it seeks control over the country’s courts and judges. The EU views the pursued changes as an erosion of democratic checks and balances.

EU membership is appreciated in Poland, having brought wide freedoms, including the freedom to travel, and economically transformed the central European nation, which had endured decades of communist rule until 1989.

Morawiecki asked the constitutional court for a review after the European Court of Justice ruled in March that Poland’s new regulations for appointing Supreme Court justices undermine judicial independence and could violate EU law. It ordered the right-wing government to suspend the regulations, which the government has not done.