WARSAW — Poland will get a new prime minister next week, the centerpiece of a cabinet reshuffle at the midpoint of the governing party’s four-year term. But the party’s undisputed leader, Jaroslaw Kaczynski, will retain the real behind-the-scenes power in the country’s increasingly authoritarian government.

Beata Szydlo, whom Mr. Kaczynski lifted from the ranks of the right-wing Law and Justice Party to become prime minister in 2015, offered her resignation at a meeting of its political committee on Thursday, said Beata Mazurek, the party spokeswoman. It was accepted.

The new prime minister, Ms. Mazurek said, will be Mateusz Morawiecki, a former international banker and a favorite of Mr. Kaczynski who had been finance minister and a deputy prime minister. Ms. Szydlo will be given some other top job in the government, party officials said.

The move will not become official until Parliament approves it next week, though that outcome is certain, as Law and Justice holds a solid parliamentary majority.