Updated

Presidential Election Day freebies are a time-honored American tradition every four years.

Today, million of American can flash that “I Voted” sticker to score some free coffee, a doughnut or even a discounted cocktail.

Two of the most highly publicized deals this year are Krispy Kreme’s Election Day giveaway (just show your sticker to get a free doughnut) and Jose Andres’ pledge to hand out free tacos to voters at his Washington D.C. eatery Oyamel.

Shaquille O’Neal now owns an Atlanta Krispy Kreme Doughnut shop

Andres has already found himself at the center of this election due to the ongoing lawsuit he’s facing after pulling out of a deal to open a restaurant at GOP presidential hopeful Donald Trump’s new hotel in Washington, D.C.

But it turns out that these food freebies might actually be illegal.

“Federal law prohibits individuals or companies from providing any pecuniary goods or services in exchange for voting,” Jonathan Brater, counsel for New York University Law School’s Brennan Center Democracy Program.

According to U.S. Code 597, or “Expenditures to Influence Voting,” the practice of handing out any type of goods —whether they’re edible or not—to impact election results is technically punishable by fine or imprisonment.

“Whoever makes or offers to make an expenditure to any person, either to vote or withhold his vote, or to vote for or against any candidate; and Whoever solicits, accepts, or receives any such expenditure in consideration of his vote or the withholding of his vote—

Shall be fined under this title or imprisoned not more than one year, or both; and if the violation was willful, shall be fined under this title or imprisoned not more than two years, or both.”

The code, says Brater, may seem harsh when applied to food giveaways but the law has serious historical implications.

“These statues were passed as anti-corruption measures many years ago when they were looking into Tammany Hall, and other things like that with large scale illegal operations to bribe people into voting a certain way,” explained Brater.

But could you really be jailed for accepting a free doughnut after performing your civic duty?

Says the lawyer, “I don’t know of any instances where this rule has actually been enforced.”

Stuck in a long voting line? Pizza to the Polls to the rescue

One way these establishments get around the rule is opening up Election Day deals to anyone—not just those with a special sticker. Having a party just celebrating election night (with beer specials) or giving someone a ride to the polls are all perfectly legal ways to get into the electoral spirit.

Election Day food are nothing new but this year, the lawyer says, people may be keeping a closer eye on what happens on voting day.

“These food deals come up during every election cycle but certainly this election has put a spotlight on all of our voting habits and election rules,” says Brater. “Perhaps people are more focused on this law now due to the intensity of this particular presidential race.”

Not worried about spending a night in the slammer for some free food? Here are some of the best Election Day dining deals for 2016.