Crisis-hit Spaniards this week sought a way out of their economic problems by betting massively on the world's biggest lottery, the Fat One – El Gordo – which distributed almost €2bn (£1.66bn) to winners around the country on Thursday.

After a nationwide spend of €2.7bn on lottery tickets, the main winners were the inhabitants of the small northern country town of Grañén, where €700m of prize money was handed out.

The town and its neighbouring villages are home to just 2,000 people – who won up to €400,000 each after buying shares in the top-paying lottery number.

The money promises to transform this farming community in the northern province of Huesca, which sits on the edge of one of Spain's harshest and most dramatic landscapes, the desert-like region of Los Monegros. Many of the winners were, like 23% of Spaniards, unemployed.

"Now I can stop worrying so much about getting the sack," a bricklayer called Oscar said after picking up €400,000.

This year the state-owned national lottery increased the size of El Gordo prizes as Spaniards spent an average of €57 each on tickets. That was a slight fall, of 0.5%, on last year's spend.

Those who placed money on the winning number received 20,000 times the sum they had bet. Smaller prizes, some worth just a few euros, went to 27 million punters.

El Gordo's 100,000 numbers are divided up into fractions, with people placing anything from a few cents to €200 on their chosen number. Among the biggest winners were the members of the Housewife's Association of Sodeto, a village near Grañén, who shared out millions of euros.

The largest winner, however, is the Spanish state, which keeps 30% of the money spent on El Gordo. The €1bn it receives accounts for 0.1% of GDP, equivalent to almost 1% of this year's budget deficit target.

Azagra admitted she had failed to sell all the tickets with the winning number, sending many back on Wednesday night and allowing the state to hold on to the prize money.

El Gordo draw has kicked off Spain's Christmas celebrations every year since it was first drawn in 1812.

Champagne corks popped in the town square and in neighbouring villages as farmers, pensioners and the unemployed celebrated their luck.

"This makes up for a very bad year in which we have worked hard for very little reward," said Susana Pérez, who runs a small accountancy firm.

Farmers said they would be paying off bank loans used to buy irrigation systems.

One of the luckiest winners bought €80 worth of tickets bearing the lucky number hours before the lottery shop closed its doors on Wednesday. He walked away with €1.6m.

A Romanian immigrant, who asked to remain anonymous, also popped in to try his luck at what is a Spanish Christmas tradition.

"I had serious doubts about spending that much money on a ticket," he said after his €20 punt landed him €400,000.

Drinks were on the house at a Romanian-run bar in Huesca, the Carlitos, where bar staff had sold on shares in the winning number to their clients – who jointly collected €150m. "I am filthy rich!" shouted one customer, Antonio, at passing cars.

Bank managers and intermediaries for those wanting to launder dirty money by buying winning tickets were looking for the winners on Thursday.

Spaniards pay no tax on the winnings and winners can be offered extra by those wanting to use the tickets as a way of laundering money earned in the underground economy, which is thought to account for 17% of Spain's GDP.