The governing centre-right coalition in the Netherlands has lost its senate majority after a populist party surged in provincial elections.
The anti-immigration Forum for Democracy won most votes and secured more seats in the upper house than Prime Minister Mark Rutte's party.
The election came two days after a suspected terror attack in Utrecht.
Addressing supporters, party leader Thierry Baudet bitterly criticised Mr Rutte's immigration policies.
"Successive Rutte governments have left our borders wide open, letting in hundreds of thousands of people with cultures completely different to ours," he told the cheering crowd.
Mr Baudet, who was criticised for continuing to campaign after Monday's shooting on a tram, said Dutch people were being "destroyed by the people who are supposed to be protecting us".
Analysts say he may team up with the anti-Islam Freedom Party, led by far-right politician Geert Wilders. Mr Wilders has seen his party's seats decline from nine to five.
With about 98% of the vote counted, Forum for Democracy has become the biggest party with 13 seats. Forum for Democracy had no seats in the current 75-seat upper house.
Mr Rutte will now need the support of other parties beyond his own coalition to pass legislation. The 38 seats previously held by his coalition will now fall to 31.
Who is Thierry Baudet?
By Anna Holligan, BBC Hague correspondent
When I first met Thierry Baudet in 2014 he leapt into the passenger seat of my car and pontificated on the state of Dutch politics and why the Netherlands would be better off outside the EU.
Five years on, this former academic is considered one of the most influential politicians in the country.
Mr Baudet, 36, is known for bizarre headline-grabbing stunts such as taking part in a parliamentary debate wearing a dysfunctional military vest, to highlight underfunding of the armed forces.
His parliamentary office boasts an imposing Italian designer fridge and a baby grand piano, while the walls exhibit paintings of some of his political heroes.
The last time we met he tinkled the ivories and earnestly extrapolated on his view that women were less ambitious than men.
He explained the "evidence'" that women prefer to read magazines about hair and make-up and have babies than concentrate on pursuing a career - and then sent me a photo of a book entitled Taking Sex Differences Seriously.
Buoyed by election success, this ambitious politician who sees himself as a champion of white culture is just getting started.
The Dutch prime minister told his supporters they were "going to have to get to work".
"We have to talk with other parties so we can continue to lead this country well," he said.
While most politicians halted their campaigns in the immediate aftermath of Monday's attack on a tram in Utrecht, Mr Baudet continued and blamed it on the government's immigration policies.
Three people were killed and three others seriously wounded and the chief suspect, Turkish born Gokmen Tanis, remains in custody.
On Wednesday, prosecutors said a letter found in the gunman's getaway car was among the reasons why a terrorist motive was being considered.
No connection has so far been found between Mr Tanis and the victims of the attack.