A still shot from the TV series 'Curro Jiménez,' about a highwayman who fought the French invaders.

Cádiz, which became the home of Spain´s government-in-exile in 1810, resorted to the lottery draw to cover the costs of the war against Napoleon’s troops, says Manuel Moreno Alonso, a professor of contemporary history at the University of Seville.

“It appears that it was Captain General of Cádiz, Gervasio Gasca who proposed to establish the lottery with the object of raising funds to alleviate the situation of displaced people and to reinforce the resistance,” explains Moreno.

It would be desirable to adopt more decent means than the lottery to sustain public necessities

Agustín de Argüelles, deputy

Although the special Christmas lottery did not exist at the time, the concept of national lotteries was not new. Evidence suggests that they already existed in the 18th century.

“There was already a lottery in 1809 in Seville, where the Spanish government, the Junta, was seated after Napoleon toppled Madrid,” said Moreno.

During the Spanish War of Independence, which began in 1808 and pitted Spain and its allies against the French, nearly all of Spain was under the control of the French empire. Napoleon’s brother, Joseph Bonaparte, was made king of Spain.

At that time, the lottery was just one more way to handle the high costs of the war, but it did have its naysayers “because it was always looked on as morally questionable, especially when it was in private hands,” says Moreno.

Moreno cites a speech given by Agustín de Argüelles, a deputy in the Spanish Congress, who said “it would be desirable to adopt more decent means than the lottery to sustain public necessities because the lottery, raffles and other games are resources that conspire with immorality and, as a consequence, are incompatible with the virtuous character that should be what distinguishes Spaniards in future.”

Despite the moral warnings, the need for cash won out. That’s why, in 1812, the government commissioned the production of 25,000 numbered wooden balls, to be handed in to authorities from December 15 to December 20, according to a document from the Historic Provincial Archives of Cádiz. Prior to this, according to the historical records, the winners of lotteries were not chosen with numbered balls, but instead with “rolled up documents” or papers that officials put in a sack and pulled out by hand.

The handcrafted balls were submitted, and Spain’s first national Christmas lottery took place on December 18, 1812. The lucky number was 03604 that first year, and the winners received 8,000 Spanish dollars (known as “reales de a ocho” in Spain) on an investment of 40 Spanish dollars.

Although the lottery was conceived of during the siege of Cádiz, by the time the lottery was celebrated the siege had already ended, having lasted from February 5, 1810 to August 25, 1812.

The war, however, was still raging, and the lottery spread from Andalusia to the rest of Spain as the Spanish troops defeated the French. In 1814, when the war was nearly over, the lottery headquarters moved from Cádiz to Madrid, and it has remained in the capital ever since.