AMSTERDAM (Reuters) - Dutch voters have overwhelmingly rejected a Ukraine-European Union treaty on closer political and economic ties, in a rebuke to their government and to the bloc’s establishment.

An unidentified jogger runs past a billboard with posters about the consultative referendum on the association between Ukraine and the European Union in a park in Utrecht, the Netherlands, April 6, 2016. REUTERS/Michael Kooren

The broad political, trade and defense treaty, which had already been signed by Dutch Prime Minister Mark Rutte’s government and approved by all other EU nations as well as Ukraine, took effect provisionally in January.

But that didn’t stop Dutch voters on Wednesday rejecting it by a 64-36 margin in a referendum that drew only 32 percent of voters to the polls - barely enough for the result to be considered valid.

Voters said they were voicing their opposition not only to the treaty itself but also to European policymakers on matters ranging from the migrant crisis to economic policy, not long before Britain’s June vote on whether to stay in the EU.

Although the referendum was non-binding, Rutte acknowledged late on Wednesday it was politically impossible for his unpopular government to ratify the treaty in its current form.

However, as the Dutch currently hold the EU’s rotating presidency, he will need time to figure out whether and how he can alter the treaty in a way that could satisfy all parties.

Rutte said the government would consult with parliament and its European partners “step by step. That could take days or weeks.”

Ukraine President Petro Poroshenko said on Thursday his country will continue moving towards the European Union despite the Dutch vote.

“Under any circumstances we will continue to implement the association agreement with the European Union including a deep and comprehensive free trade agreement,” he told reporters in Tokyo.

Russian Prime Minister Dmitry Medvedev said the result was “an indication of European attitudes to the Ukrainian political system.”

Any proposed changes to the treaty will have to pass both houses of the Dutch parliament, including the Senate, where Rutte’s shaky coalition lacks a majority. Some political commentators have predicted a coalition collapse over the issue, though new elections must be called no later than March 2017 anyway.

If a compromise can be found, it must also be palatable to other European countries, as well as the European Union Commission and the Ukrainian government.

Rutte’s main political rival, the anti-EU, anti-Islam politician Geert Wilders, whose popularity has hit all-time highs amid Europe’s refugee crisis, said the result was “the beginning of the end” for Rutte’s government and the EU in its current form.

“If two-thirds of the voters say no, that is a vote of no confidence by the people against the elite from Brussels and The Hague,” he tweeted.

The European Commission has said it will wait for the Dutch government to suggest a way forward.

Options include leaving the Ukraine agreement in force provisionally, or drafting exemption clauses for the Netherlands as has happened in somewhat similar circumstances in the past.

Manfred Weber, leader of the center-right European People’s Party (EPP), the biggest bloc in the European Parliament, and an ally of German Chancellor Angela Merkel, said the referendum result was a “big defeat” for the Dutch government and should be taken seriously.

“We need to make Europe more democratic and transparent,” Weber told Deutschlandfunk radio, saying there was too much backroom politics going on in Brussels. He added that politicians needed to engage more with citizens, explain things to them and show that they take people’s concerns seriously.

He said that applied particularly to Britain ahead of the June referendum on the country’s membership of the European Union.

The United States, which has supported Kiev’s efforts to move closer to the West, expressed disappointment at the outcome of the Dutch vote.

“Clearly we’re disappointed by the results, but we do respect the views of the Dutch people,” State Department spokesman Mark Toner told reporters, adding: “We respect the Dutch political process.”

Toner said it was too soon to know what implications the vote would have for Ukraine’s ambitions of closer ties with the EU.

“I don’t think we know yet,” Toner said. “President Poroshenko has said that they’re going to continue to work towards an association agreement, take the steps they need to take in terms of reforms and other measures. We support them in those efforts.”