CONCORD — An effort to introduce a new form of wagering at New Hampshire’s 16 charity gambling locations failed on Thursday.

The House rejected a Senate-passed bill to allow historic horse racing video machines, which allows bettors to wager on horse races that have already happened.

Supporters of the measure such as Rep. Patrick Abrami, R-Stratham, said it was necessary to help the 584 charities in the state that rely on revenue from charitable gambling avoid the diversion of New Hampshire gamblers to the new casino opening up in Everett, Mass.

“The Lottery Commission agrees, especially in the southern tier, our charities are going to take a hit, so this comes in the nick of time,” he said.

Critics of the proposal described the bill, SB 41, as a cleverly disguised effort to bring slot machines to New Hampshire.

Rep. Jerry Stringham, D-Lincoln, said the 16 sites would share 800 to 1,000 machines, about 50 per location.

“Combined with existing table games, these facilities will become mini-casinos. That’s very different from the way they operate today,” he said. “The proponents deny this, while at the same time saying they need these machines to compete with the real casinos like the one about to open in Everett, Mass.”

The House has over the years repeatedly defeated casino bills sent over by the Senate.

“We’ve been the backstop against casinos in this state,” said Stringham. “Please don’t be taken in by this backdoor effort to create not one but 16 casinos in our state.”

The measure was defeated in a bipartisan vote, with 64 Democrats joining 93 Republicans.

Lobbyist Rick Newman, who represented charities in the legislative process, said lawmakers were influenced by an aggressive lobbying campaign funded by the Oxford Casino in Maine.

“The out-of-state casinos won today, but New Hampshire citizens lost,” he said.

Other House bills

Wayfair decision: The House passed SB 242, a measure designed to help the state address last year’s Supreme Court decision in South Dakota v. Wayfair, in a 308-25 vote.

The U.S. Supreme Court ruled last June that states like South Dakota, which has a sales tax, could collect that tax from online retailers in other states that sell to South Dakota customers, including the five states like New Hampshire that do not have a sales tax of their own.

SB 242 prohibits other states or taxing jurisdictions from requesting information, conducting examinations or imposing sales tax obligations on sellers in New Hampshire, unless they register with and provide notice to the New Hampshire Department of Justice.

The bill also establishes a commission to study ways to protect New Hampshire businesses from the uncertainty created by the Wayfair decision.

“This is truly a rock-solid bipartisan effort, but our work may not be over,” said House Republican Leader Dick Hinch, R-Merrimack.

“I look forward to continuing to work on this issue as the legal landscape develops. We must continue to be vigilant and not turn our state’s small businesses and entrepreneurs into tax collecting agents for other states and jurisdictions.”

Commuter rail: The House voted 213-141 today to pass SB 241, which authorizes the DOT to apply for some $4 million in federal funds to complete a project development study for a rail connection to Boston, which is included in the governor’s 10-year transportation plan.

The funds would pay for an engineering plan and environmental permitting, while establishing firm cost and revenue estimates.

“The project development phase does not obligate the state to move forward with rail construction, but it will answer the questions about how much passenger rail would cost, how it would be paid for, and give us the necessary information to make informed decisions,” said Rep. Sue Newman, D-Nashua.

Gov. Chris Sununu included a commuter rail connection to Boston in the state’s unsuccessful pitch to Amazon to build their second headquarters in New Hampshire.