Despite reaching broad agreement on distracted driving legislation before the start of their August recess, a deal to ban hand-held cellphone use by drivers fell apart Wednesday night after Senate negotiators refused to sign off on details that House lawmakers thought had been resolved.

The last-minute collapse, apparently triggered by a disagreement over the wording of the bill, left uncertainty hanging over a years-long effort to prevent drivers from using electronic devices behind the wheel and both branches taking veiled shots at one another over who was responsible.

Around 7:45 p.m., passage of a hands-free bill seemed imminent.

Senate President Karen Spilka said there was an "agreement in principle" and that the matter "should be done tonight," and both branches kept sessions — expected to be their final formals before at least a month off — open all night awaiting the chance to vote on a bill.

The two chairs of the conference committee negotiating differences between the House and Senate legislation, Rep. William Straus and Sen. Joseph Boncore, each confirmed the "agreement in principle" and timeline in Thursday interviews with the News Service. But as the night went on, their consensus vanished.

"I was hopeful at that point as well," Boncore said. "It's just that words matter when you're writing a law. Process is important, but good product is the goal."

Members pulled a jacket from the clerk's office, a procedural move done right before a conference committee files a final report including a bill. The jacket has lines for all six conferees to sign a final report before filing.

Around 11:30 p.m., Straus said, the three representatives on the committee left the jacket bearing their signatures and a draft version of the bill that had been reviewed by legal counsel for both branches with the clerk, expecting senators to sign off so it could be formally introduced.

"We took that merged document incorporating the legal counsel technical edits and it's in a jacket down at the House clerk's office," Straus said. "The House conferees had signed. I agree with the Senate president. I thought we were done."

But the trio of senators, two of whom needed to sign the jacket for the proposal to advance to the next step, never gave their approval. The paper still sat unsigned in the clerk's office Thursday morning.

"I'm not sure what they submitted but we hadn't come to an agreement on the language and as much as everyone would love to see this get done, it's important that it's done right," Boncore said.

Boncore said he's not sure why the House conferees decided to turn in a report with only three signatures. "I'm not sure what to make of it considering there was really no agreement on the text," he said.

While none of the conferees would discuss the specific concerns that had to be addressed in the bill, Boncore said Senate conferees were worried about writing a law similar to the 2010 ban on texting while driving "that has been a real problem for law enforcement to enforce."

"Any time you write a law that could become litigious, you have to be sure your true intent is pretty exact in the words," Boncore said.

Rep. Joseph Wagner, one of four Democrats on the conference committee, said it was "pretty clear" to him that the issue was resolved Wednesday evening before the eventual breakdown.

"When I had seen both the House and Senate counsel's edits of the draft document and saw that those edits were merged into a final document, it was pretty clear to me at that point that we achieved consensus," Wagner said. "If something happened outside of that, I was unaware."

Democratic leaders convened the conference committee on June 19 after the House and Senate both stood by their own versions of the legislation. Both bills similarly ban virtually all uses of electronic devices behind the wheel save for a single tap or swipe to activate hands-free mode, but they differ in other provisions.

The Senate version requires law enforcement to track demographic data for every driver pulled over, but the House bill only calls for monitoring of traffic stops that end with a citation issued. In addition, the Senate's bill requires drivers to enroll in a course after a second offense and categorizes third and subsequent violations as surchargeable offenses for insurance, neither of which the House backed.

It was unclear Thursday whether one of those points remained a source of disagreement for members or if the concern was with language in another section. The draft document in the clerk's office reviewed by the News Service appeared to follow the Senate's framework on surcharges and the House's on data collection.

The conference committee conducts its deliberations in private.

"There was an agreement in principle but the terms are important and the language is important and both sides need to agree on that," Boncore said. "Although it didn't get done last night, I'm satisfied that we've come a long way and both sides have negotiated in good faith."

Sen. Dean Tran, one of two Republicans on the conference committee, was not available for an interview on Thursday, but in a statement said he was "very disappointed" that an agreement could not be reached before the summer recess.

"I am hoping we will soon produce a report that would be acceptable to both chambers, or at the very least have something that would serve as a foundation for the Legislature to build on," said Tran, of Fitchburg.

"This bill is important for the public's safety and I am very disappointed that an agreement was not able to be reached before the legislature recessed. I am looking forward to continuing the discussions on this bill next month," he said.

Both Straus and House Speaker Robert DeLeo said the bill could be approved any time in August without a roll call during an informal session. Despite the delay, DeLeo said he is "not losing hope" on the bill.

"What I have learned through most pieces of legislation is until they come up for an actual vote and are sent on to the governor's desk for signature, they can never be counted done," DeLeo told reporters at a Thursday event, according to audio provided by the speaker's office.

Regardless of the next step, the delay frustrated advocates who have pushed for years for the state to enact stricter regulations than an existing, difficult-to-enforce texting ban that has failed to stem the growing rate of crashes caused by distracted driving.

Mary Maguire, Massachusetts spokesperson for AAA Northeast, said she was "very disappointed" that the bill was not resolved Wednesday night but remains hopeful that a vote will come soon.

"I don't think the bill is going to put an end to all distractions in the car, but it certainly will focus motorists' attention and the public's attention on the problem of distracted driving," she said. "When a bill like this passes, it really forces people to take stock of their driving habits and puts the focus back on safety."

Sen. Mark Montigny, who has pushed for similar legislation for years, slammed the inaction during the closing minutes of Wednesday night's session and renewed his criticism Thursday.

"I'm frustrated because people continue to die," Montigny told the News Service. "My staff and I have worked most closely with the families advocating for this because they don't want anyone else to lose their parents, their children, their loved ones."

He tied the latest delay to a stretch of inability to get a similar bill across the finish line. The Senate advanced hands-free legislation each of the past two sessions only to watch it never come up for a final vote in the House, and in 2008 — before the current texting ban was approved — the House approved a broader ban on electronic devices that was unsuccessful that session in the Senate.

Montigny said that he does not have any personal knowledge of what caused the process to break down Wednesday night, but finds Straus' comments about the lack of Senate signatures unconvincing.

"That's just a bullshit explanation by Chairman Straus who hasn't been able to deliver a bill on the House side for the last nine years," Montigny said. "If he wants to say 'this is the exact language we agreed to and there is no reason why the Senate wouldn't sign it because they agreed to it' and show you the language, then I would listen to signing of the jacket as a real reason and not a public relations press tactic."