WARSAW — NATO leaders gathered Friday in the Polish capital to discuss a daunting list of threats to global security, with the Western post-Cold War order in question as never before. And now Poland itself is on the list of challenges.

A government elected in October has engaged in a broad-based attack on the nation’s democratic institutions, critics say, eroding gains made after the 1991 fall of communism. The NATO summit — long-planned and the largest international event ever to descend on Poland — has put a harsh spotlight on the government’s moves, the most recent of which came on the eve of the summit, when Poland’s lower house of Parliament approved a law about the country’s top court that critics say threatens its independence.

President Obama said Friday that he told Polish President Andrzej Duda about “our concerns about certain actions and the impasse around Poland's constitutional tribunal.”

“We've urged all parties to work together to sustain Poland's democratic institutions,” Obama said, suggesting that rule of law, freedom of the press and an independent judiciary were all under threat.

The issues in Poland add to the sense that the stability of Western democracies is shakier than many had felt in the heady 25 years since the breakup of the Soviet Union. Britain voted two weeks ago to split from the European Union, a landmark move that threatens the entire post-World War II project. In the United States, critics from both parties have questioned presumptive Republican presidential nominee Donald Trump’s commitment to freedom of religion, an independent judiciary and constitutional protections for the media. And Russia’s 2014 annexation of Ukraine’s Crimean Peninsula was the first time borders had changed by force in Europe since 1945.

In Poland, the right-wing Law and Justice party that won a broad victory in October has engaged in a sweeping effort to entrench its gains, appointing five new judges to the country’s Constitutional Tribunal and refusing to recognize those appointed by the previous government.

The changes adopted Thursday were an attempt to address Western concerns about the threats to the court, but they inspired even more criticism because they leave in place steps that subordinate the court to the control of the presidency.

The bill “poses a serious threat to the rule of law,” said Council of Europe Commissioner for Human Rights Nils Muiznieks in a statement Friday.

The new Polish government has also taken an eclectic series of steps to force public broadcasters to adopt a pro-government line. And it has planned trials against officials from the previous government for their role in a 2010 plane crash that killed then-President Lech Kaczynski, the twin brother of the leader of the ruling party.

The European Commission and the European Parliament have also condemned the Polish government’s moves.

The combined efforts have created concerns that Poland could be following the path of Hungary, another E.U. member that has drawn censure over challenges to its democracy under Prime Minister Viktor Orban.

Polish leaders have denied that their reforms are a challenge to democracy and say they are merely following the will of the people after their landmark election victory.

Read more: