WARSAW — Until recently, Poland was the brightest star among the former communist countries of Central Europe. But for the last few weeks it’s been having a very rough transition from one ruling party to another.

Just how rough became apparent to NATO and the rest of the world on Friday when news broke that Ministry of Defense and Polish military police had made a night raid on the headquarters of the NATO-affiliated counterintelligence center in Warsaw.

The ministry did not provide a clear explanation, other than to say the Polish officer who had served as head of the center was insubordinate, and officials rushed to say that NATO, and especially the United States, shouldn’t read too much into this.

But, in fact, there’s much more going on, and the raid is just one incident in a season of growing uncertainty.

On Saturday, for the second time in a row, tens of thousands of Poles flooded the streets—this time in more than 20 large cities—to protest against the rule of the conservative Law and Justice Party (PiS), which won parliamentary elections in October.

The demonstrations brought together activists and followers of the liberal and leftist parties, as well as significant social movements and NGOs. They held up banners with slogans defending democracy and appeals to the government to follow the law and constitution. They demanded the parliamentary majority give up its plans to take full control of the Constitutional Tribunal.

The tumult we’re seeing today began in the spring of 2015. The Civic Platform party had been in power for eight years under the strong hand of Prime Minister Donald Tusk. But he decided to leave Warsaw for Brussels, to take up the post of European Council president. He may have thought that his party could carry on without him thanks to what looked like many positive economic indicators, but, in fact, a large part of Polish society has not shared the prosperity.

Tusk’s party decided to put off to the future the structural reforms the country still needs. Scandals and swindles started to surface. The Civic Platform’s popularity was ground down day by day. And its weakness was used by the main opposition party, Law and Justice, which has a committed conservative constituency asserting Catholic values, a strongly nationalist Poland, and reduced ties to the European Union.

Law and Justice does not disguise the coolness of its relations with Germany, nor its hostility towards Russia.

At the head of Law and Justice is Jaroslaw Kaczynski, a former Polish prime minister. His twin brother, Lech Kaczynski, was killed in 2010 in the tragic crash of the Polish Air Force One in the Russian city of Smolensk, along with 100 representatives of the Polish elite.

The Law and Justice winning streak began in May, when suddenly President Bronislaw Komorowski lost the election to a little-known politician Law and Justice candidate, Andrzej Duda, in the second round.

In the Polish system, although officially the president oversees the armed forces and participates in foreign policy decisions, his role is mainly ceremonial. But the May elections showed the shape of things to come.

The real changes began after Oct. 25, when Law and Justice knocked out the other parties in the parliamentary elections and it formed its own government.

The key to its victory was support for the party by normally centrist voters, many of whom were responding to the Law and Justice appeal on bread-and-butter issues, not matters of geopolitics.

Law and Justice proposed the extension of social benefits, shortening the period of employment before retirement, the rapid increase of the amount of income exempt from personal income tax, and finally, in response to increasing demographic challenges of the country, the introduction of a monthly child allowance of PLN 500 ($125) per head, starting with the second child in the family.

Economists are warning that such spending increases will push up the budget deficit by leaps and bounds, and will force the government to further raise levels of indebtedness. As a consequence Poland, whose economy this year will have grown by 3.4 to 3.5 percent, may face the specter of a serious economic slowdown.

So, Law and Justice already is searching frantically for the funds to cover the new expenses. Its plans include the introduction of taxes on large retail stores, banks, and insurers, a tactic employed by the increasingly isolated right-wing government of Victor Orban in Hungary.

Indeed, comparisons between the two are becoming increasingly commonplace. Hungary, which used to be a favorite of Western investors in the region, today has a very bad press. And the performance of the new Polish government, after just one month in office, got a raft of critical reviews: CNN, The Washington Post, The Economist, The New York Times, The Guardian and the flagship German media have produced a series of withering commentaries on the actions of the Polish authorities.

In the midst of these uncertainties, the economy, which was supposed to be No. 1 on the new government’s action plan, has been pushed onto the back burner amid the other changes introduced by the new government.

Law and Justice claims that the constitutional court, made up of judges appointed by the previous government, will block any bill proposed by the new one. That is why party head Jaroslaw Kaczynski, who formally has no state function, but in practice oversees the activities of both President Duda and Prime Minister Beata Szydlo, implemented a plan to take full control of the court. He prepared draft laws that will lead to full replacement of the judiciary bench.

Polls already show declining support for Law and Justice and the rapid growth of the opposition, including a newly born liberal party called Modern Poland. If elections were held today, Law and Justice would be relegated once again to opposition. Such a rapid deterioration in a party’s support is unprecedented in Poland.

Law and Justice knows, however, that it has four years before the next election, so it is carrying out purges not only in the supreme court, but in the public media (state television, radio and news agency), on the boards of state-owned companies.

Defense policy will also see a kind of revolution. Given huge concerns about Russian aggression in neighboring Ukraine, the previous Polish government began a massive process of modernization of the army, shopping for missile defense system, helicopters, and submarines. The first signals from the new government indicate that these public tenders might be either heavily delayed or re-started from scratch.

The new government, which in July 2016 will host the annual NATO summit in Warsaw, started by asking NATO to establish permanent bases in Poland and the Baltic countries. That idea does not have many supporters in Washington, London, or Berlin.

President Duda also demanded that Poland join Germany, France, and Russia at the Minsk meeting table where talks take place to decide the future of Ukraine.

Recent weeks have seen some softening of the truculent language used by the Polish authorities, but the bad PR was remembered in the West—and then, adding insult to injury, came the raid last week on the NATO intelligence center.

So far, the inclination of Law and Justice to provoke tumult and resentment seems to have few bounds.