Gov. Charlie Baker filed legislation Thursday that would legalize sports betting in Massachusetts.

The bill would allow sports wagering lounges at three casinos and permit Massachusetts residents to place sports wagers online. It follows the Supreme Court's decision last year to strike down a federal law banning the practice. Other states have also moved to legalize sports wagering, including Rhode Island, New Jersey and Pennsylvania.

“Expanding Massachusetts’ developing gaming industry to include wagering on professional sports is an opportunity for Massachusetts to invest in local aid while remaining competitive with many other states pursuing similar regulations,” Governor Baker said in a statement. "We look forward to working with our colleagues in the Legislature to pass this bill into law.”

Baker told WGBH News that the legislation his administration filed is based on the law in New Jersey, which legalized sports betting in June.

“It establishes a regulatory structure run through the Gaming Commission for casinos and online wagering,” Baker said. “We think this is a relatively responsible way to go about doing it.”

The Baker administration estimates the bill would generate $35 million in revenues for Massachusetts in fiscal year 2020.

To hear Gov. Baker’s full interview, click on the audio player above.