Mr. Morawiecki, 49, a former banker, has conducted extensive business abroad and is fluent in several languages. He was seen by party leaders as better qualified to represent Poland to Western leaders, especially European Union officials who have seen the country’s rightward drift as a threat to the bloc’s unity.
The move comes just a day before Poland’s parliament is expected to vote on new laws to alter the country’s courts, a step that officials in Brussels have labeled a threat to the independence of the judiciary. Opposition leaders said the cabinet reshuffle was an attempt to deflect attention from that court vote. Protest groups plan to gather outside parliament on Friday to oppose the court vote.
When the ruling party initially unveiled the laws last summer, it described them as “court reform,” but critics claimed they were an attempt to put the courts more firmly under the ruling party’s control, and tens of thousands of Poles took to the streets for more than a week.
The protests stopped only when Poland’s president, Andrzej Duda, vetoed two of the court bills and promised to write his own versions, which he unveiled in November.
The moves to restructure Poland’s courts caused the European Union to begin a process that could result in the invocation of Article 7, a part of the union’s founding treaty that allows for the punishment of member nations that violate democratic standards. Though that could lead to economic sanctions against Poland, or even revocation of voting rights in the union, such an outcome is considered unlikely.
Under the initial legislation presented last summer, the country’s entire Supreme Court would have been forced to resign, with replacements to be determined by the ruling party’s justice minister. The new version, proposed by President Duda, lowers the retirement age for high court judges to 65, immediately forcing 40 percent of the 83-member court from office.
European Union officials said this new version still threatened the rule of law in Poland.
The cabinet reshuffle, which is also expected to include the resignation or change in portfolio for other ministers, is not unusual at the midterm of a government’s four-year term. It does not indicate a change of policy in the government.
Ms. Sydlo tweeted thanks to her supporters on Thursday evening.
“These two years were an amazing time,” she wrote, “and the service to Poland and Poles was an honor.”