A bill making basketball the official state sport in Massachusetts appeared to be a slam dunk on Beacon Hill.

It was the idea of fourth-graders at the Mulready School in Hudson, who persuaded their local legislators to file the bill.

State Rep. Patricia Walrath said it did raise a few eyebrows in a state that has recently celebrated world championships in baseball and football.

But basketball does has a special place in Massachusetts history. The sport was invented in Springfield by James Naismith in 1891. And the Boston Celtics won 16 NBA titles between 1957 and 1986.

The basketball bill was passed from the Legislature to Gov. Mitt Romney this week. The governor is expected to sign it.