If the thought of watching the ball drop in Times Square again is already making you yawn, consider perking your New Year's Eve celebration with this tradition from Spain: As midnight nears on Nochevieja, or "old night," the last day of the year, the entire country gathers in front of television screens or in town squares, clutching a small bowl of green grapes and wearing red underwear. More on the underwear later.

The camera of the main national TV channel focuses on the clock tower of the 18th-century Real Casa de Correos in Madrid's Puerta del Sol while a pair of announcers in formal wear, high above the thousands of revelers packed into the chilly plaza below, quickly repeat instructions one last time. After the bells ring out four times in quick succession — "Wait, wait, ignore those!" — there is a slight pause and then begins a series of 12 chimes — one for each month.

At that first dong, Spaniards from Barcelona to Bilbao to Cadiz pop a grape into their mouths. There is little time to chew and swallow, much less savor, because about two seconds later there is a second dong and a second grape gets popped into the mouth. And on through 12 dongs and las doce uvas de la suerte ("the 12 lucky grapes").

If you eat all 12 by the end of the final bell's toll — and that doesn't mean finishing with a half-chewed mouthful — then you will have good luck in el año nuevo (the new year).

This popular tradition is a century or so old, though its exact origins remain debatable. One oft-repeated story says that growers in Alicante had a bumper 1909 harvest and found a creative way to sell off their surplus.

Recently, though, old newspaper articles have been republished that show the tradition began decades earlier, in the 1880s. These stories tell of bourgeoisie in Madrid copying the French tradition of having grapes and champagne on the last day of the year. Before long this custom had been adopted by certain madrileños who went to Puerta del Sol to see the bells chime at the turning of the year and, most likely in an ironic or mocking manner, to eat grapes like the upper class.

About 80 percent of the "lucky grapes" come from the valley of Vinalopó in central Alicante, on Spain's Mediterranean coast. Fleshy, deliciously sweet, and pale, almost whitish-green in color, they are a traditional Spanish variety called Aledo that, maturing late, are not harvested until November and December.

But these are no ordinary grapes. Protected by Denominación de Origen(designation of origin, or D.O.) status, budding clusters are wrapped in paper bags in June and July and kept covered as they ripen. This was first done in the late 19th century to protect them from a plague of cochylis vine moths. Growers found it also conserved the flavor, aroma and color of the grapes, and slowed their maturation.

According to the regulatory office for D.O., Uva de Mesa Embolsada Vinalopó, bagging the grapes also means that "they form a peel that's much finer by not having to fend off the aggressions of the rain, the sun or the wind."

When I went to Barcelona's iconic La Boqueria market to buy my grapes for this year's festivities, Maria, the seasoned stall owner of Frutas y Verduras E. Lafuente, told me that "having such a fine skin also makes them quicker to eat. There's less to swallow."

And, with the bells impatiently tolling, that small detail makes a difference. It is no easy task eating grapes so quickly, especially when each has three or four seeds. (Seedless grapes are a rarity here, though some painstakingly remove the seeds beforehand. Ever more extreme — or modern — are the small tins of 12 seeded and peeled grapes now sold in supermarkets.) The only way to finish all 12 is to not chew, just take a solid bite and then swallow, pips and all.

Such a strategy is easier to plan than to execute, especially by grape number six or seven when, in my experience, the giggles kick in. After 15 years living in Spain, I have learned that the only way to finish all 12 is by concentrating on the chimes and ignoring the rest of the surrounding commotion.

If scoffing grapes at midnight isn't strange enough, convention says you must do so while wearing red ropa interior, or underwear — a bra, a sock, a garter, whatever. And — stranger yet — the undergarment should be given to you by someone else.

Maria, the stall owner, reminded me not to forget a third traditional lucky charm to accompany red underwear and grapes: drop a gold ring into my celebratory glass of cava (local champagne-style bubbly from Catalunya). "Just don't swallow it!" That would, no doubt, be a harbinger of bad luck.

When the 12 dongs finish and the last of the grapes has been swallowed, there are cheek kisses, toasts with glasses of cava, and pieces of turrón (almond and honey nougat from Alicante) passed around as the most expensive commercials of the year play on TV and phone lines jam with the crush of well-wishing calls.

In this year of acute economic hardship in Spain, many will hope that eating the grapes brings better luck in 2013, and try particularly hard to finish them all before the last chime fades to silence and the new year begins.

Jeff Koehler is the author of Morocco: A Culinary Journey With Recipes. His next cookbook, on Spain, will be published in 2013. Visit www.jeff-koehler.com or follow @koehlercooks.