A casino co-owned by Keeneland and The Red Mile in downtown Lexington will close at the end of business Sunday, the two companies said earlier in the day, citing ongoing uncertainty over the legality of the devices inside the casino. The two companies said in a joint statement that they had made the decision to “temporarily” close “until there is more clarity surrounding the situation.” On Thursday, the Kentucky Supreme Court declined a request from Kentucky tracks and the state’s racing commission to reconsider an opinion issued last year that invalidated a type of gambling device in use at many racetracks in the state. The devices, called historical horse racing machines, use horse races that have already been run to generate random numbers determining payouts to players. They look, sound, and play almost identical to slot machines. The Supreme Court ruling said that several aspects of how the machines are operated are not in accordance with the state’s definition of “pari-mutuel wagering.” “We have confidence the Kentucky legislature will continue its efforts to protect jobs and state revenue generated by [the devices], as well as protect Kentucky’s signature horse racing industry,” the statement said. All racetracks in the state currently operate the devices, mostly at casinos adjacent to their racing facilities. The devices were approved by the Kentucky Horse Racing Commission in 2010, and they have generated hundreds of millions of dollars for their operators as well as significant subsidies for purses and breeding awards in the state. The Supreme Court opinion issued last year requires a lower court in the state to re-issue its own opinion, and so far, the court has not yet released an updated ruling. Other racetracks in the state have taken the position that until the lower court releases its opinion, the casinos can continue to stay open. In a statement issued in response to questions, a spokeswoman for Churchill Downs Inc., which operates two casinos in the state and has plans for two more, said that the company is awaiting the updated ruling from the Franklin Circuit Court before deciding on any course of action. “We understand the Kentucky Horse Racing Commission will implement any required changes consistent with the Franklin Circuit Court’s judgment once issued, and we will work with the KHRC accordingly,” the spokeswoman, Tonya Abeln, wrote. “Our priority remains on a legislative solution.” The racing industry has asked the state legislature to support legislation that would clear up the legality of the devices. The legislature is not scheduled to re-convene until Feb. 2, and no bill has been produced yet.