Sixty-eight medics at the University Regional Hospital in Malaga had been diagnosed with the coronavirus, the Andalusian regional government said.
Health authorities said they were investigating the source of the infection but added all 68 attended a Christmas party on December 1 at which 173 people were present.
Those who contracted Covid-19 all had antigen tests or the third booster vaccinations before attending the party, health authorities said.
Another possible source of the infection could have been a large meal for hospital staff, hanno detto le autorità.
Those infected have shown mild symptoms.
Prime Minister Pedro Sanchez warned people to remain vigilant against the coronavirus over Christmas.
“We must not lower our guard,” he told journalists in Madrid.
Health authorities in Andalusia have recommended staff at other public and private hospitals do not attend Christmas parties.
Four cases of the Omicron variant have meanwhile been confirmed in Spain’s Balearic Islands, health authorities there said.
A father arrived in the Balearic islands recently and infected two members of his family and a fourth person recently arrived in Spain from South Africa, hanno detto le autorità.
Spain had earlier confirmed a total of five cases of the Omicron variant.