Poland's conservative ruling party named Finance Minister Mateusz Morawiecki the country's new prime minister, replacing Beata Szydlo, who resigned Thursday.
The conservative party took the risk of trading a popular leader for a former international banker who seemed better-suited to representing Poland to critics outside the country.
The reshuffling came after weeks of speculation that Prime Minister Beata Szydlo might be replaced, even though her government is popular with many Poles and the economy is booming.
Szydlo resigned during a meeting of the ruling Law and Justice party in Warsaw, party spokeswoman Beata Mazurek said.
The party leadership wants Szydlo to serve in another senior government position, Mazurek said without elaborating.
Deputy Foreign Minister Jan Dziedziczak suggested Szydlo will be the deputy prime minister, a post Morawiecki held in her government, reports Reuters.
Government critics interpreted the leadership change as primarily an attempt to divert attention from a vote scheduled for Friday on laws that would give the ruling party significant power over Poland's judicial system.
Party leader Jaroslaw Kaczynski is widely seen as the real power behind the government, and it's not clear if Morawiecki will seek to set an independent course or if he would also largely follow the direction Kaczynski sets, as Szydlo did.
Some see Morawiecki, a former international banker who speaks foreign languages, as better placed than Szydlo to defend the country in dealings with European partners who believe democracy is eroding in Poland.
He is expected to reassure financial markets, given that he is regarded as business friendly, especially by the standards of the others in the Law and Justice party.
Szydlo, a coal miner's daughter and the mother of a priest, has wide support among conservatives. Many party supporters said in recent days they didn't want her to resign.
She thanked her supporters in a tweet Thursday night.