A tiny Spanish country town believes it has found a way to make unemployment, debt and economic crisis disappear in a puff of smoke – by leasing out its land for marijuana plantations.

The town hall of Rasquera in Catalonia on Wednesday voted to sign a €1.3m (£1.1m) agreement with a cannabis association in nearby Barcelona to plant marijuana for its 5,000 members.

It will allow the association to plant on a seven-hectare stretch of town hall land – roughly the size of 10 football pitches. "This is a chance to bring in money and create jobs," explained mayor Bernat Pellisa of the Catalan Republican Left party, as older townsfolk worried that he was turning Rasquera into a drugs mecca.

Pellisa said he had sought legal advice that the scheme, part of a set of "anticrisis" measures passed at a packed town hall meeting, did not break Spain's ambiguous cannabis laws.

"The produce will only go to members of the association and it won't all be cannabis," he added. "There will be crop rotation with cereal and sugarbeet."

The Barcelona Personal Use Cannabis Association (ABCDA), part of a mushrooming movement of private marijuana clubs in Spain, will pay the town €650,000 a year for the right to grow its annual supply there.

"Growing for oneself is not illegal, but this is a delicate issue," explained lawyer Oriol Casals.

Pellisa said the deal would create up to 40 jobs and allow the town hall to pay off its €1.3m debt in two years.

"There are five or six other projects in the wings," explained Pellisa. They included supplying seeds to Spain's so-called grow shops, which are allowed to sell them to people wishing to grow their own plants.

A second cannabis club with 7,000 members was due to meet Pellisa for talks on Thursday.

An alternative clinic for people with cancer was also being studied.

The deal will turn Rasquera, where local produce traditionally includes olives, almonds and goats, into one of the biggest legal suppliers of cannabis in Europe.

Not everyone in town, which lies 90 miles (140km) south of Barcelona, likes the idea. "This makes us the laughing stock of Catalonia," said secondary schoolteacher Joan Farnós.

"It will lead our grandchildren to perdition," one elderly woman told journalists.

But others saw a chance to beat Spain's 23% unemployment rate and its fall back into recession. "I haven't smoked since I did my military service, but I'd go and work planting marijuana because I haven't had a job for two years," local farm labourer Mario Amorós told El País.

Pellisa said he had informed the regional government of Catalonia, which runs the local police, about the project. The government had told him it would consult lawyers.

"We demand our own sovereignty on this," he added.

Spain's cannabis clubs argue that if growing and possessing marijuana for personal consumption is legal, then there is nothing illegal about forming a club to that end.

"Cannabis use is an established and increasingly accepted reality in our society," explained Martin Barriuso, of the Basque cannabis federation. "Instead of turning our backs on this reality we think the reasonable thing to do is to find a way to regulate it, encouraging responsible use and making it difficult for adolescents to obtain."

"Our associations work on this basis … paying taxes, creating jobs and stopping people going to the black market," he added.

Rasquera's town hall has agreed to set up a committee to draw up protocols on "security and risk control", according to a draft of the contract with ABCDA.