The decision is a blow to Idaho’s horse racing industry, where officials have pleaded that the machines are vital to keeping their businesses afloat.

In a unanimous decision issued Thursday, the court ruled that the ban must go into effect because Otter did not complete the veto within the required five-day time span. In Idaho, a bill automatically becomes law - even if the governor doesn’t sign it - unless it is vetoed within the legal timeframe.

“This pivotal decision reaffirms that even Idaho’s highest elected officials must follow the Constitution,” said Coeur d’Alene Tribe Chief James Allan, chairman of the tribe that filed the lawsuit against the state, prompting the court’s ruling. The tribe, which profits from its own video gaming on the reservation and faced competition from the new horse racing versions, said it was “extremely happy” with the ruling.

Secretary of State Lawerence Denney must now certify the law, which will make the machines illegal. He did not immediately return calls from The Associated Press on when he will certify it. There are currently about 250 machines installed in three locations across Idaho.

Otter issued a statement Thursday maintaining his actions were legal.

“I stand by my word as well as my earlier decision to veto this legislation. It is clear the Senate took up my veto and voted to uphold it. While I disagree with today’s ruling, I will continue working toward a solution that ensures a viable live horse racing industry in Idaho,” Otter said.

Known as instant horse racing, the machines allow bettors to place wages on prior horse races with no identifiable information. The machines have spinning wheels, sounds and animations that mimic slot machines.

Soon after the machines were made legal in 2013, horse track owners in three locations invested millions to purchase and install the machines with hopes of boosted profits. Portions of the profits went to the track owners and breeding groups, with the amount paid to the highest finishers at live races. Horse track owners have warned that they would be forced to close if the machines were banned.

Yet lawmakers passed the legislation doing just that earlier this year with supermajority approval in both chambers after critics argued the machines were essentially slot machines, which are illegal under Idaho’s strict anti-gambling laws.

However, once SB 1011 -the bill outlawing the machines- reached Otter’s desk, the governor delayed releasing his decision, doing so after the five-day window had passed. Otter says he put off announcing the veto so he could talk to lawmakers over the Easter weekend about his decision rather than having lawmakers find out in the press.

The Idaho Senate then failed to override the governor’s decision on a 19-16 vote. Instead, three statements were entered into the Senate journal that day -submitted by the Senate’s President Pro Tem Brent Hill, Minority Leader Michelle Stennett and Secretary Jennifer Novak- stating that the Senate failed to receive the governor’s veto by the required deadline.

Thursday’s decision pointed to the statements and Senate journal as key pieces of evidence proving Otter improperly submitted his veto.

“The Deputy Attorney General would apparently have us believe that the governor timely returned the original of the bill to some phantom senator, who gave the bill back to the governor, and then the governor later returned the original of the bill to the Senate Pro Tem,” the court wrote. “There are certainly no facts supporting that fantasy.”

“We are currently reviewing all of our options and assessing the significant impact that complying with the court’s order will have on the immediate and long-term future of Les Bois Park,” said John Sheldon, president of Treasure Valley Racing, which operate the Boise-based horse track.

Idaho now joins states like Nebraska and Maryland that have blocked the machines.