An anti-immigration populist party has won the most votes in elections for the upper house of parliament in the Netherlands, days after a shooting in Utrecht, robbing the governing coalition of its majority and forcing it to seek new alliances on the left.

In a further fragmentation of Dutch politics, the Forum for Democracy (FvD) party of Thierry Baudet, a flamboyant former academic and columnist, is on course to win 12 seats in an upper house containing a record 12 parties, none with more than 12 seats.

Launched in 2016, FvD won just two seats in elections to the lower house in 2017. But with more than 95% of votes counted in the provincial elections, it looked sure of being the largest party in the senate along with VVD, the party of the prime minister, Mark Rutte.

“We stand here in the rubble of what was once the most beautiful civilisation,” Baudet, 36, told cheering supporters late on Wednesday in a speech peppered with classical and literary references. “We won because the country needs us.”

Accusing Rutte of ignoring voters, he said the “stupidity and arrogance” of the elites had been punished. FVD campaigned on a platform calling for more direct democracy and less immigration, and against what Baudet refers to as “climate-change hysteria”.

A proponent of Dutch-first cultural, social and economic policies, Baudet wants improved relations with Russia, opposes the euro, and has called for the Netherlands to leave the EU – although he has since said he will see how Brexit plays out first.

Newspapers reacted with surprise to the results, which pollsters said could have been influenced by the deaths of three people in a shooting in the central city of Utrecht on Monday. A Turkish-born man has been arrested in connection with the attack.

Authorities have not yet determined a motive but have said they are still taking seriously the possibility that it was terrorism. Baudet, who unlike politicians from other parties continued campaigning after the attack, blamed the incident on the government’s lax immigration policies.

“We are being destroyed by the people who are supposed to be protecting us,” he said. “Successive Rutte governments have left our borders wide open, letting in hundreds of thousands of people with cultures completely different to ours.”

The four-party coalition led by Rutte’s VVD party lost seven seats to fall to a total of 31 and will now need to rely on opposition parties, including the popular Green Left, which doubled its seats to eight, in order to pass legislation.

“We are going to have to get to work,” Rutte said. “More coffees, more phone calls. I’m counting on the country remaining well manageable with this result.”

The Netherlands has a tradition of flamboyant populist leaders running back to Pim Fortuyn, who was assassinated in 2002. Baudet appears to have taken votes from the country’s previous favourite anti-immigration leader, Geert Wilders, whose Party for Freedom (PVV) saw its senate seats slump from nine to five.

The upper houses’s final makeup will be determined in May. Analysts have said the populists’ improved performance will not easily be translated into increased clout in the upper house, since the other parties have pledged not to work with them.