President Donald Trump’s animosity toward the mainstream news media has fueled the conditions that led a CNN reporter and three crew members to be arrested while covering the unrest in Minneapolis sparked by the death of an unarmed black man at the hands of police.

George Freeman, executive director of the Media Law Resource Center, drew a parallel between Trump’s executive order on Thursday seeking to remove legal protections under the First Amendment for social networks, as codified in the 1996 Communications Decency Act, and Friday’s arrests.

“Really the saddest thing is that Trump has fostered the kind of environment that allows and makes more likely the sort of unjustifiable attack on the press that we saw in Minneapolis,” Freeman told Variety. “That’s a very sad and depressing occurrence — that the President of the United States is fostering an environment where unjustifiable arrests can occur.”

Trump’s executive order is “patently unconstitutional” and in violation of the First Amendment because his impetus for the order is so transparent, Freeman said. Twitter has struggled with how to enforce its rules regarding hate speech and misinformation in connection with Trump, who has embraced Twitter as an outlet for his unvarnished views. Twitter of late has applied warning labels to some of Trump’s missives, but has not taken steps to formally block him from the platform.

“It’s clear that the motivation arose from Trump trying to punish Twitter for flagging his posts. That’s Twitter’s speech and it’s clearly against the First Amendment for government to take action against an individual citizen in retaliation for that citizen’s speech.”

Moreover, “the text of the executive order certainly sounds more like a political screed than legislation that is actually going to happen.”

Meanwhile, First Amendment protections were also under fire in Minneapolis early Friday. CNN reporter Omar Jimenez and three others were released after being detained for about 90 minutes. Minnesota Gov. Tim Walz wound up apologizing to CNN for the incident, which unfolded live on the all-news network. Thanks to CNN’s cameras, viewers were able to see Jimenez talking to police and offering to move. Jimenez was reporting early Friday morning on a street that looked like a war zone after a night of riots and looting.

“Wherever you want us, we will go,” Jimenez can be heard telling police officers who were trying to clear the street. In a remarkable moment, Jimenez faces the camera to report on the situation while a police officer had a hand on his arm. Seconds later, Jimenez is handcuffed and pulled away. A CNN producer and two camera operators were subsequently arrested. The last minutes of live footage came at an off-kilter angle from a videocamera that was laid on the ground because the camera operator was being hauled away.

In Freeman’s view, Jimenez’s behavior in that tense moment was exemplary.

“It makes the media looks good and the authorities look terrible,” Freeman said. “The media looks good especially since this reporter said, ‘I’ll go wherever you want to go.’ You can’t be much more cooperative than that.”

Freeman, who represented the New York Times for 30 years, said the rules for the conduct of journalists in police-related situations are clear. “The key question is whether the press are interfering with police work,” Freeman said. “We tell our reporters and photographers to back off in these situations and work from a position that is not interfering with police work. That’s exactly what (Jimenez) did.”