It was a tense confrontation, to be sure.

Pat McCrory, the embattled former Republican governor of North Carolina, was attending President Trump’s inauguration in Washington on Friday when a group of protesters cornered him on a downtown sidewalk and began yelling “Shame on you!” With him was the conservative commentator Lou Dobbs and three unidentified women.

One protester took out a cellphone and started filming. The video, which later went viral, shows McCrory in a black coat walking away as activists call him a “bigot” and a “coward” and shout an obscenity at him. They follow McCrory down an alleyway to the back door of a building, where he smiles at the group, which appears to number about a dozen, and waits for someone to let him and his companions inside.

“Shame,” the protesters continue to chant, before police officers in bike helmets arrive to break up the crowd.

The whole encounter lasted three and a half minutes, and the video showed no sign of violence.

But it was all too unsettling for North Carolina state Sen. Dan Bishop.

On Monday, Bishop, a Republican from Charlotte, said he was planning to introduce legislation to protect the former governor — or any other current or former state official — from such encounters. Specifically, Bishop said, his bill would make it a crime to “threaten, intimidate, or retaliate against a present or former North Carolina official in the course of, or on account of, the performance of his or her duties.”

In a post on his website, Bishop said the video showed “rioters” chasing McCrory down a blind alley and threatening his safety.

“Lines are being crossed,” Bishop wrote. “Other governors never faced riotous mobs in their post-service, private lives, without personal security.”

McCrory, who lost a bitterly contested bid for reelection in November, became the target of intense criticism last year after he signed a law making North Carolina the first state to require transgender people to use the bathroom that matched the gender listed on their birth certificates, rather than the one with which they identify. House Bill 2, also known as the “bathroom bill,” stoked backlash from LGBT groups and other advocates, and prompted widespread boycotts against the state.

McCrory also came under fire over the state’s voter identification law, found by a federal court to have systematically discriminated against black voters, as well as his handling of the protests and riots that broke out in Charlotte after police shot and killed an armed black man in the fall.

Bishop was among the sponsors of HB2, which also barred municipalities from enacting their own LGBT anti-discrimination ordinances.

In his post Monday, Bishop said he would model his new legislation on a similar measure in D.C. designed to protect government officials. District law allows up to five years imprisonment for anyone who threatens, intimidates or retaliates against current or former District employees in the course of their duties.

“So should it be in North Carolina,” Bishop wrote. “This is dangerous.”

“I will also urge my colleagues,” he continued, “to take other appropriate steps to guarantee the personal safety of Gov. McCrory by all necessary means.”

Pat McCrory, governor of North Carolina, speaks during an interview at the executive mansion in Raleigh on March 23, 2016. (Jerry Wolford/Bloomberg)

The North Carolina General Assembly reconvenes Wednesday, at which point Bishop said he will float the bill. He told the News and Observer that in the meantime he hoped North Carolina Attorney General Josh Stein would investigate whether the protesters who confronted McCrory violated any federal laws.

“I’m sure a referral from him to appropriate federal authorities would be very influential,” Bishop said.

A group called the Greensboro Socialists — ISO claimed credit for the video, saying on Facebook that it had gone viral “thanks to the dedicated and timely work of our comrades.” The video was posted by a user named Udai Basavaraj, who told The Washington Post that he believed McCrory deserved to be accosted.

“That was nothing compared to the way he and his posse cornered, marginalized and shamed millions of taxpayers in this state with vicious legislation and made North Carolina and its legislature the laughing stock of the nation,” Basavaraj said.

McCrory’s former spokesman told the News and Observer that the incident was “regrettable,” and thanked police for intervening.

Bishop went farther. In his post, he questioned whether Basavaraj and his group “stalked” the former governor and claimed their conduct might have landed them in jail if McCrory had been a former District official.

Bills similar to the one Bishop is planning to introduce have cropped up in other states in recent months. Most aim to limit the rights of protesters or expand law enforcement power at a time when demonstrations against police shootings, energy projects and other issues have grown into nationwide movements.

In Minnesota, the legislature advanced a bill this week that would would allow cities to charge protesters for police services if they are found guilty of illegal assembly or public nuisance, as the Minneapolis Star Tribune reported. In North Dakota, a Republican lawmaker recently floated a measure that would protect motorists who hit protesters blocking a roadway, after activists opposing the Dakota Access oil pipeline swarmed cars during demonstrations last year. And an Indiana bill would allow police to shut down traffic obstruction from protesters “by any means necessary.” Similar measures have been brought up in at least five other states.

In North Carolina, the state American Civil Liberties Union chapter balked at Bishop’s proposal. Sarah Gillooly, the organization’s policy director, told the News and Observer that any attempt to criminalize peaceful speech would violate the Constitution.

“People’s right to criticize politicians — whether in a newspaper, at a meeting, or on a public street — is the very heart of what the First Amendment protects,” Gillooly said. “Everyone deserves protection from violence, but politicians who run for and serve in public office shouldn’t get special treatment to shield them from criticism.”