BOSTON (AP) — Backers of automotive repair legislation approved in the waning hours of the legislative session say it could serve as a model for a national policy.

The bill was approved Tuesday by the Massachusetts House and Senate after a compromise was struck between automakers, dealers, and advocates for a requirement that car manufacturers make available to independent mechanics all repair codes and other diagnostic information.

The legislation included some key concessions to automakers that were not part of a ballot question that will go before Massachusetts voters in November. The industry would be given until 2018 to satisfy a mandate that all new cars sold in the state include an onboard diagnostic and repair information system that can easily be accessed with any typical laptop computer.

The ballot question called for a similar requirement in new cars as of 2015. Under the compromise legislation, car manufacturers will also have more flexibility to choose the interface device that would provide access to repair information; automakers had balked at being bound to a single interface protocol identified in the ballot measure, saying it could force the industry to use outmoded technology.

Gov. Deval Patrick has 10 days to act on the bill, and a spokeswoman for the governor said Wednesday he had not yet reviewed it. But the Massachusetts Right to Repair Coalition, which led the fight for the measure, said it was confident of Patrick's signature.

"Massachusetts has (led) the way through the years on a range of issues; providing added convenience and value for car owners is now on the first-in-the-nation list," the coalition said in a statement, adding that the prospective new law would be a "big win for consumers."

Regardless of whether Patrick signs the bill, the original ballot question will still appear in November because it was too late for the coalition — which had gathered the necessary signatures to place it before voters — to remove it from the ballot.

The campaign over the ballot issue had been expected to be costly and divisive. Now, both sides are pledging to join forces to urge voters to vote down the question so the compromise would stand.

Should the ballot question pass anyway, the Legislature could still move to reinstate the new language when it reconvenes in January.

Backers of the right to repair effort say it will address a common complaint among consumers that they are often forced to take their vehicles to more expensive dealers for repairs because the mechanics at their neighborhood garage often cannot access repair codes or perform tasks such as turning off a "check engine" light on the dashboard.

Art Kinsman, a spokesman for the coalition, said despite the added time being given to automakers to install the universal system, consumers will benefit from the bill immediately because it also requires manufacturers to make available for purchase by independent repairers the same tools they provide to dealers for cars made after 2002.

"Repair and diagnostic information should never be a secret, Kinsman said.

Automakers contend that most diagnostic information is already available to repair facilities that wish to buy it.