Celebrating employees of the "Sagrado Corazon" nursing home in the central town of Campo de Criptana, many wearing their white uniforms, jumped up and down, sang and drank sparkling wine outside the building, images broadcast on Spanish TV showed.
Twenty-two workers at the home held at least one ticket bearing the winning number for the first prize, each paying 400,000 euros ($475,000).
"They are workers who really need it," the home's director, Ana Maria Campos, told local media.
A truck driver who volunteers at the nursing home bought 30 winning tickets during a trip to the northwestern region of Galicia. He kept two for himself, gave one to each of his two brothers and re-sold the remaining 26 to staff at the nursing home.
"I am thrilled that I brought so much luck and money to my hometown," Jesus Martinez, 54, who has been a volunteer at the home for the past decade, told online newspaper El Espanol.
His two tickets won him 800,000 euros while the nursing home staff's 26 tickets will award them a combined 10.4 million euros.
Campo de Criptana mayor Antonio Lucas-Torres said he was "very happy, because anything that rains money on Criptana is good because it has repercussions on the economy of the town."
The town of around 14,000 residents, located in an arid plain in the province of Ciudad Real, has an unemployment rate of 19.4 percent.
"Everyone deserves to win, but these people especially so because they are very hard working. They have given their all to this nursing home," Lucas-Torres added.
Spain's annual Christmas lottery, known as "El Gordo" or "The Fat One", is ranked as the world's richest, handing out a total of 2.38 billion euros this year.
Unlike other big lotteries that generate just a few big winners, Spain's Christmas lottery aims to share the wealth, with thousands of numbers getting a prize.
This year's winning number -- 79140 -- appeared on 1,600 tickets, for a total payout of 680 million euros.The vast majority, 1,300 tickets, were sold in Galicia.
The Christmas lottery has been held uninterrupted since 1812. Even Spain's 1936-39 civil war did not end it, as each side held its own draw during the conflict. It has become a popular Christmas tradition in Spain, with friends, colleagues and bar regulars banding together to buy tickets.
The standard ticket costs 20 euros ($22) and queues form outside lottery stores weeks ahead of the televised draw, which goes on for over three hours.
Children from a Madrid school that used to be a home for orphans pick small wooden balls bearing the winning numbers and prizes out of two giant tumblers, and sing them out.