Massachusetts House and Senate officials struck a deal on the first statewide regulations for ride-hiring services such as Uber and Lyft just before the end of their legislative session.

Late on Sunday night, the two chambers approved a compromise bill that established a 20-cent-per-ride fee on such services and added a background check to the companies' existing procedures that will include a state-run inspection of drivers' histories, reported.

RELATED: Former Boston Uber driver to launch all-female ride-hailing app

"The people of the commonwealth have made it clear they want ridesharing, and we appreciate the thoughtful process the legislature followed to ensure that safe and affordable transportation options are available across Massachusetts," WCVB quoted a statement from Lyft spokesman Adrian Durbin, who added that he hoped Gov. Charlie Baker would sign the bill.

The newly passed legislation did not include measures that would have prohibited the ride-hiring services from picking up people at Logan Airport or the Boston Convention and Exhibition Center, stated. Without such a ban, Uber and Lyft can deal directly with Logan about serving its passengers.

The bill would protect the innovative nature of ride-hiring services but would also offer greater consumer protections, House Speaker Robert DeLeo said to WCVB. Gov. Baker now has 10 days to sign the bill into law. 

RELATED: Boston driver sues Uber on behalf of Mass. drivers

Rep. Aaron Michlewitz described the new background check requirement as "first in the nation," adding that he expects other states to look to the Massachusetts bill as model legislation, added.