Voters in the Netherlands have rejected in a referendum an EU partnership deal to remove trade barriers with Ukraine.
Turnout was low, 32.2 percent, but above the 30 percent threshold for the vote to be valid.
The deal was rejected by 61.1 percent of votes, compared with 38.1 percent in favour.
Prime Minister Mark Rutte said the government may have to reconsider the deal, although the vote was not binding.
Ukrainian President Petro Poroshenko insisted his country would "continue our movement towards the EU".
A foreign ministry official in Kiev told the BBC that the result was disappointing, adding that Dutch Eurosceptics could not take Ukraine hostage to express dissatisfaction with the EU.
The vote was widely seen in the Netherlands as a test of public opinion towards the EU.
It was triggered by an internet petition begun by Eurosceptic activists that attracted more than 400,000 signatures.
The result creates a headache for the Dutch government, as the Dutch parliament approved the EU association agreement with Ukraine last year. All the other 27 EU member states have already ratified the deal.
"My view is that if the turnout is more than 30 percent, with such a victory for the 'No' camp, ratification cannot go ahead without discussion," Mr Rutte said in a televised reaction.
It is also an embarrassment for a Dutch government that currently holds the EU presidency.
Geert Wilders, who leads the anti-EU and anti-Islam Freedom Party, said the result was the "beginning of the end for the EU".
Officially the Netherlands has rejected a landmark deal between the EU and Ukraine - in reality the issues that dominated this campaign were much wider.
The referendum was triggered by the Eurosceptic movement, which used a new Dutch law designed to promote democracy to force a vote by gathering enough signatures on a petition.
From the start activists said this was a chance for Dutch voters to express frustration at the EU, in particular what they see as its desire to expand despite democratic shortcomings.
But they were not asked to simply pass judgement on the EU, and throughout the campaign those promoting a Yes vote were frustrated by what they saw as attempts by Eurosceptics to hijack a debate which should have been about relations between Ukraine, Russia and Europe.
Some say the multiple layers to this referendum mean the result cannot seen as a true reflection of the scale of Dutch Euroscepticism.
Nonetheless, the rejection of this deal will rattle the nerves of European leaders, who are already struggling to maintain unity in the face of economic instability and the migrant crisis.
Wider issues behind referendum
The vote comes less than three months before British citizens decide in their own referendum whether to leave the EU altogether.
A spokesman for campaign group Leave.EU, Brian Monteith, said: "This humiliating rejection of the Ukraine agreement demonstrates that people don't have to support the EU and its expansionist agenda to feel European."
Russian Prime Minister Dmitry Medvedev also appeared to welcome the result, tweeting that it was an indication of the European attitude to Ukraine's political system.
The Russian government was vehemently opposed to the EU deal with Ukraine and was widely thought to have pressed then-President Viktor Yanukovych to reject it in November 2013.
Mr Yanukovych's decision prompted protests in Kiev that ultimately led to his downfall.
Pro-Russian separatists in eastern Ukraine have widely been blamed for the killing of 298 people, when a Malaysia Airlines flight from Amsterdam was shot down in July 2014. The Netherlands lost 193 of its citizens.
The Ukrainian president stressed the non-binding nature of the vote.
"I am sure that strategically this event is not an obstacle on Ukraine's path towards Europe," Interfax-Ukraine news agency reported Mr Poroshenko as saying.
Dutch Interior Minister Ronald Plasterk accepted the cabinet would need to consider the result but added that the government might need to look again at the 2015 referendum law that triggered Wednesday's vote. The minimum threshold could be based on the number of voters rather than the percentage, he suggested.
One of the Dutch Eurosceptics behind the referendum, Thierry Baudet, said there could be more votes in the future, covering the euro, open borders and any future EU trade deal with the United States.
EU Commission President Jean-Claude Juncker had described the stakes in the run-up to the vote as being high, warning that a No vote could trigger a wider crisis in the 28-member bloc.
On the eve of the vote, Ukrainian students rallied in Kiev urging the Dutch to back their cause
"How will our politicians react if the outcome is a resounding no?" Ukraine's One Plus One TV asked as the polls opened.
In the run-up to the vote, Ukraine's media were abuzz with stories about various Ukrainian initiatives to promote the "Yes" campaign, including what they called an "invasion by propaganda troops" - local politicians and activists travelling to the Netherlands.
Many commentators in Ukraine are now wondering whether Kiev had done enough to counter the No campaign, whose efforts included the distribution of free waffles in wrappers with slogans urging the Dutch to vote against the agreement.