HARTFORD, Conn. — Connecticut lawmakers approved most of a legislative package early Wednesday that could lead to a new tribal casino being built in East Windsor, a move that came hours after a multifaceted deal was reached that includes more off-track betting parlors in the state.

The House of Representatives voted 103-46 in favor of the bill that allows the Mashantucket Pequot and Mohegan tribes to build a casino in East Windsor to compete with a new MGM Resorts casino in Springfield, Massachusetts. The bill previously passed the Senate and now heads to Democratic Gov. Dannel P. Malloy’s desk. While Malloy has not advocated for a third casino in Connecticut, he has said he preferred the tribal proposal over another bill that would have opened up the process to other casino developers.

Wednesday’s vote came less than 23 hours before the General Assembly was scheduled to adjourn its regular legislative session.

The House then approved a companion bill, by a vote of 77-72. It had been crafted at the eleventh-hour to help gain support for the tribal casino bill. The bill still needs to be approved by the Senate before the session adjourns at midnight Wednesday.

“I’m glad it’s almost over,” said Democratic House Speaker Joe Aresimowicz, who has been working to broker an agreement that could satisfy members of the House. There are those who support the tribes’ proposal in an effort to protect jobs at their southeastern Connecticut casinos and other lawmakers who want to create an open casino bidding process that could lead to other casino developers possibly building gambling facilities elsewhere in Connecticut.

Mohegan Tribal Chairman Kevin Brown said families of casino workers at Foxwoods Resort Casino and Mohegan Sun were “breathing a sigh of relief” that the legislation passed. The tribes have warned that thousands of jobs and millions of dollars in slot machine revenues to the state could be at risk if the border casino was not approved.

“With this vote, we have all demonstrated a commitment to protecting the state of Connecticut and the good jobs of its residents,” Brown said.

But some lawmakers, including the House Democratic chairman of the Public Safety Committee, Democratic Rep. Joe Verrengia of West Hartford, voiced concern about granting the tribes exclusive rights to build a new casino on non-tribal land. He predicted the facility could be bogged down by legal challenges for years.