Poland's conservative Law and Justice party won enough votes in Sunday's parliamentary elections to govern alone, final results show.
The party won 37.58% of the vote, giving it a majority in the lower house of 235 out of 460 seats.
Civic Platform, which led Poland's coalition government for the last eight years, won 138 seats or 24.09%.
It is the first time a single party has won enough votes to govern alone since democracy was restored in 1989.
Correspondents say the Eurosceptic Law and Justice (PiS) party, led by Jaroslaw Kaczynski, succeeded in attracting votes from people who feel excluded from the country's economic growth.
It offered higher child care benefits and tax breaks for the less well-off.
Its anti-immigrant stance looks likely to set it at odds with the European Commission over migrant quotas in future.
Mr Kaczynski, 66, was not running as prime minister and instead nominated Beata Szydlo, a relative unknown, as the party's choice for the post.
The 52-year-old miner's daughter is seen as a more moderate face to lead the new government, reports the BBC's Adam Easton in Warsaw.
However, some observers said Mr Kaczynski - the twin brother of Poland's late president Lech - could take on the top job himself in the months to come.
Outgoing PM Ewa Kopacz, of Civic Platform, has already accepted defeat.
Three other parties also won enough votes to get seats in parliament: a new right-wing party led by rock star Pawel Kukiz with 8.8%; a new pro-business party, Modern Poland, with 7.6%; and the agrarian Polish People's Party with 5.13%.
PiS is close to the country's powerful Roman Catholic Church and has promised increased benefits and tax breaks.
It supports a ban on abortions and in-vitro fertilisation and believes a strong Nato is necessary to offset the perceived threat from Russia.
Civic Platform, for its part, sought closer ties with the EU.