To many people in the small town of Rasquera in the east of Spain, it seemed like the perfect remedy to the economic crisis: a massive legal cannabis plantation that would give a new high to the local economy.
But the plan to make Rasquera into a centre of marijuana production for southern Europe appears to have gone up in smoke after the locals showed lukewarm support in a referendum.
Mayor Bernat Pellisa had pledged to resign, in effect cancelling the project, if his bold plan were to win the support of fewer than three-quarters of voters in this Catalan town of 900 souls, previously known for its olives, almonds and goats.
Last night the result came: only 56% of voters backed his plan, after a bitter campaign in which opponents accused him of artificially stuffing the census with supporters.
But Bernat has declined to resign immediately, telling TV crews gathered in the town to see the result, that he would think again, since he had got majority backing - leaving the project in confusion.
The vote is nevertheless a blow to the Barcelona Private Consumption Cannabis Association, which had agreed to lease out municipal land to grow marijuana for its 5,000 members.
Bernat had said the plan would provide up to 40 jobs when unemployment in Spain stands at 24%. It would also bring up to €1.3m to the town in two years – allowing it to pay off its council debt.
Police, the central government in Madrid and the autonomous region authorities in Catalonia had been less enthusiastic about the town plan, saying it is illegal.
But Bernat had said that he had commissioned legal opinions which had argued that growing cannabis for private consumption, even if it was between thousands of people, was legal in Spanish law.
Numerous cannabis clubs have sprung up across the country in recent years, with courts accepting that small plantations providing marijuana for a limited number of people are not illegal.
But even members of Spain's cannabis lobby had said they thought Rasquera's plan was too big to be considered legal.
By Giles Tremlett