BOSTON (CBS/AP) — Gov. Charlie Baker signed police reform legislation into law on Thursday after months of back-and-forth with Massachusetts lawmakers.

Last week, Baker sent the original bill approved by the House and Senate back to the chambers for revisions. The final version he signed bans chokeholds and establishes a civilian-led commission to certify and decertify police officers.

Training oversight will remain within a committee under the Executive Office of Public Safety.

The law requires officers to intervene if they see another officer using excessive force, bars officers from shooting into a fleeing vehicle unless doing so is necessary to prevent imminent harm, and strictly limits the use of rubber pellets, chemical weapons or dogs against a crowd. It also limits the use of no-knock warrants, requiring that they be issued by a judge and only when an officer’s safety would be at risk.

The legislation is in part a response to statewide demonstrations following the May 25 killing of George Floyd, a Black man, by a white Minneapolis police officer.

“This bill is the product of bipartisan cooperation and thanks to the Black and Latino Caucus’ leadership on the hugely important issue of law enforcement accountability, Massachusetts will have one of the best laws in the nation,” Baker said in a statement. “Police officers have enormously difficult jobs and we are grateful they put their lives on the line every time they go to work. Thanks to final negotiations on this bill, police officers will have a system they can trust and our communities will be safer for it.”

The ACLU also reacted to the signing.

“Months after protests erupted across Massachusetts and the nation in response to the police killings of George Floyd, Breonna Taylor, and others, Massachusetts has taken a crucial first step toward police reform,” ACLU of Massachusetts Executive Director Carol Rose said in a statement. “This new law acknowledges the growing public movement to end policing as usual.”

(© Copyright 2020 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)