A compromise agreement on a bill authorizing sports betting in Massachusetts was reached Monday, which could be the final piece of the puzzle when it comes to horse racing returning to the Bay State.

Behind the scenes, a group of investors has been working to open a new track in the state ever since Suffolk Downs closed its doors in 2019, but understood that their plans would not be practical without there being a source of revenue beyond what can be made off of selling bets. With sports betting about to become a reality in the state and with the bill granting sports betting licenses to anyone operating a racetrack, the group is prepared to move forward and plans to apply to the Massachusetts Racing Commission for a racing license some time this fall.

“When it comes to the project, sports betting has been the catalyst all along because there has to be some sort or of revenue source,” said Lou Raffetto, the former vice president of racing at Suffolk Downs who is advising the group, which calls itself Commonwealth Racing. “We all understand it’s not going to come from just racing itself. They are very serious about this and the intent will be that by October we need to apply for a racing license.”