HARTFORD — The police accountability bill revealed a split in the majority Democratic caucus during a contentious all-night session Friday morning, but after seven-and-a-half hours of debate the majority came together to send it to the state Senate for final action after an 86-58 vote.

The most-controversial piece of the bill stayed alive in a rare tie vote and the entire legislation passed at about 8 o’clock Friday morning.

A 72-72 deadlock on a Republican amendment that would have stripped the bill of language limiting police “qualified immunity” against litigation failed in the tie vote. The House tally machine was kept open for 45 minutes as proponents of the reforms scrambled for support from lawmakers who, due to the coronavirus, had been sequestered in their Capitol complex offices since 11 a.m. on Thursday.

“This bill gives our police, towns and police chiefs an enhanced opportunity to work collaboratively with their unions, with us as the legislature and with their citizens to address the issues of police accountability and transparency,” said Rep. Steve Stafstrom, D-Bridgeport, co-chairman of the Judiciary Committee, stressing the proposal of a new inspector general in charge of investigating and prosecute the excess use of force.

The bill has a new procedure in which officers may lose their certification, ending the tactic of being fired from one department, then finding a police job elsewhere. The most controversial section of the bill would restrict so-called qualified immunity, under which police officers are shielded from some lawsuits over their actions.

On Thursday morning about 300 off-duty police officers and supporters - many without face masks to fight COVID-19.

Other protestors under the Black Lives Matter banner rallied in favor of the accountability measures at the Capitol on Thursday.

The bill now goes to the Senate for a scheduled debate Tuesday.