Updated

Poland's new prime minister is making his foreign debut Thursday at a European Union summit, a first test if the Western-educated former banker can bridge a deepening rift between his right-wing government and Brussels.

Mateusz Morawiecki, 49, was tapped last week by the leader of the ruling Law and Justice party, Jaroslaw Kaczynski, to replace Beata Szydlo. Her two years as prime minister were marked by bitter conflicts with the EU over migrants, the environment and the state of Poland's democracy.

Poland's current isolation marks a sharp reversal for a country that has seen massive economic development since joining the EU in 2004, which brought it an infusion of EU subsidies and foreign investment, and which until 2015 was emerging as an increasingly influential voice in European affairs. That growing clout was reflected in the election in 2014 of a Polish prime minister, Donald Tusk, to lead the European Council.

Tusk leads the two-day EU summit that begins Thursday where leaders are to focus on Brexit, migration and defense.

While Kaczynski has not explained his reasons for switching prime ministers, party members have suggested one hope was to improve the country's international standing.

As a communicator, Morawiecki certainly seems better fitted to the task than his predecessor. He is fluent in English and German, studied at universities in the United States and Germany, and for several years headed the Polish branch of a Spanish bank, Santander — experiences that give him a more cosmopolitan air than many in the conservative party.

In his first address to the Polish parliament Tuesday, Morawiecki appeared more conciliatory on Poland's extensive logging in the protected Bialowieza forest, a point of contention between Warsaw and EU officials. He vowed if the EU court rules that the logging must stop, it would.

Still Morawiecki echoed his party's line that the logging is meant to fight a bark beetle outbreak.

Recent developments in Warsaw, however, will make in hard for Morawiecki to persuade his European counterparts to drop their concerns over the rule of law in the 28-year-old democracy.

In a case that U.S. State Department says raises concerns about media freedom, Poland's media regulator on Monday fined a private news channel nearly 1.5 million zlotys ($420,000) for what it alleged was unfair reporting during a political crisis last year. The channel, TVN24, is the country's key source of independent television news.

Lawmakers last week also passed two new laws that change the rules regulating the Supreme Court and the National Council of the Judiciary, a body that appoints judges, in both cases giving the ruling party control over both institutions. At the Supreme Court, they have lowered the retirement age for judges from 70 to 65, which will force the immediate retirement of some 40 percent of more than 80 judges — allowing the president, a party ally, to name the replacements.

Law and Justice says it seeks to purge the justice system of old communist holdovers and corrupt judges that it says represent an elite caste out of touch with regular people. Europe's top human body, the Council of Europe, disagrees, and said aspects of the laws bear similarities to the Soviet judicial system.

Morawiecki says he fully backs the changes. A former anti-communist dissident, he said there are judges on the court now that had passed judgments on his fellow activists in the 1980s.

He described the justice system as "Augean stable that needs to be cleansed."