Amid national outrage and widespread protests after the killing of George Floyd, Massachusetts Sen. Ed Markey is calling for the end of a legal doctrine he says shields police officers from accountability.

“It’s something that goes right to the core of the kinds of changes which the American people are crying for, demanding on the streets of our country,” he told Jim Braude on WGBH News’ Greater Boston.

Markey introduced a bill with Sen. Kamala Harris (D⁠ — Calif.) and Sen. Cory Booker ( ⁠— -NJ) Wednesday to eliminate the doctrine, called qualified immunity, which protects public officials ⁠— including the police ⁠— from civil lawsuits for actions they take on the job.

“It’s about saying bad cops should not be able to escape accountability for what they did, that the family of that victim should be able to sue that bad cop,” he said.

In George Floyd’s case, the former Minneapolis police officers involved in his death are facing criminal prosecution. On Wednesday, Minnesota Attorney General Keith Ellison updated the state’s charge against Derek Chauvin, who knelt on Floyd’s neck for more than eight minutes, to second degree murder and charged three other former officers who were on the scene with aiding and abetting murder.

But qualified immunity could protect the officers from a civil wrongful death suit from Floyd’s family

Markey said he would also back other criminal justice reform efforts to raise the age that young people can be tried as adults and to create all-civilian review boards to investigate claims made against police officers.

The senator said legislation might also be needed to prevent President Donald Trump from sending federal troops into U.S. cities to control the ongoing protests — something the White House says a centuries-old law called the Insurrection Act empowers him to do.

“He’s talking about using an 1807 statute. I think it’s a very dubious platform to use for something as expansive as he was talking about,” Markey said. “I think that we’re going to find that there are many Republican Senators who do not want the military to be used in these civilian contexts.”

Markey argued Trump’s threat to deploy troops is just a ploy to fan the flames of the country’s deep-seated racial divisions.

“This is a problem that goes to his ability to unearth the hatred that was already there,” he explained. “That’s what he’s trying to do [with regards to] the white voters of the United States that he was able to appeal to in 2016, that race-baiting, in order to win again in 2020.”

Markey said the solution to the president’s divisiveness will be found at the ballot box.

“We can see it on streets all across the country and we’re going to turn it into an electoral tsunami that changes our country and allows us to put the laws on the books that are going to be able to change once and for all the direction of our country towards racial justice, social justice and criminal justice,” he argued.

But the senator — who faces his own challenge in November from Rep. Joe Kennedy (D ⁠— MA) — said he worries Trump will refuse to accept the results of the election if they don’t go his way.

“I think it could very well happen. I think it could very well be a part of his ultimate political game plan,” Markey said. “He’s gonna try anything, there’s no question about it. I think that it’s going to be a test for our country, but I think it will fail and fail almost immediately if he seeks to do that.”