The actions of a Texas trooper seen in a dashcam video ordering a woman out of her car during a routine traffic stop last week appear to be legal — but the officer could have deescalated the situation, legal experts said Wednesday.

The woman who was arrested after the July 10 confrontation, Sandra Bland, 28, would be found dead of an apparent suicide in her cell at the Waller County Jail three days later.

Her death has sparked a firestorm of criticism against the authorities, and some believe that Bland didn’t deserve to be arrested in the first place.

"He was permitted to use reasonable force to get her out of the car," Gabriel Chin, a professor of law at the UC Davis School of Law and a former prosecutor, told NBC News on Wednesday.

Related: Sandra Bland's Sister Says Video Shows Trooper Bullied Her After 'Ego Bruised'

"He can do that, because she had an obligation to get out of the car when he ordered her to do so," Chin said. Everything in the video appears to be legal under federal law, he said, although he said the situation could have been handled differently.

The dashcam video released Tuesday by the Texas Department of Public Safety shows Trooper Brian Encinia and Bland get into an argument after Encina pulled Bland over for failing to signal a lane change in Waller County at around 4:30 p.m. July 10.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The video shows Encinia talking to an increasingly upset Bland, who refuses to put out a cigarette when asked. He orders her out of the car, and threatens to pull her from the vehicle. At one point he yells "get out of the car!" and draws what appears to be a Taser stun gun, warning, "I will light you up."

Related: What We Know So Far About the Death of Sandra Bland

Even if Bland was disrespectful, police officers are trained to not take abuse personally, said Eugene O’Donnell, a professor of law and police studies at John Jay College of Criminal Justice in New York City and a former New York Police Department officer and prosecutor. In the video, Encinia appears to lose his temper.

"People are supposed to depersonalize as much as they can, to deflect, not absorb," O’Donnell said.

Bland was arrested on a charge of assaulting a public servant and she was booked at the Waller County Jail. She was found unresponsive in her cell at around 9 a.m. July 13, and authorities said it appears she hanged herself. Bland’s family does not accept the official account, and don't believe she would have killed herself.

The FBI and Texas Rangers are investigating the circumstances of Bland’s death. The Texas Department of Public Safety has placed Encinia on desk duty after it found "violations of procedures regarding traffic stops and the department's courtesy policy."

Related: 'Depression' Doesn't Explain Brand's Death in Jail Cell, Family Says

NBC law enforcement analyst Jim Cavanaugh said the arrest appears to be unnecessary. "He’s escalating it by yelling at her and not explaining why he wants her to get out," Cavanaugh said.

"Her not getting out of the car could be a reason to arrest her — but why did it even have to come to that? She did not appear to be a danger to the trooper inside her car," Cavanaugh said.

Encinia wrote in an arrest affidavit that Bland "became combative" during the stop, that she was placed in handcuffs for officer safety, and that she swung her elbows and kicked him.

Chin said the Supreme Court has ruled that officers can order anyone out of their vehicle for nearly any reason in the name of officer safety.

"I do think the officer lost his temper and decided to make the arrest not necessarily because of any legitimate law enforcement reason, but because he was irritated," he said.

O’Donnell said that with the technology available to police, like dashboard-mounted cameras, states should pass laws that allow uncooperative motorists in certain circumstances to be later fined or otherwise sanctioned, eliminating the need for some arrests.

Gary Chandler, a sergeant with the Texas Highway Patrol and president of Texas Department of Public Safety Officers Association, said Wednesday that regardless of what mistakes may have been made, the trooper could not have known that Bland would later be found dead.

"No doubt you can critique what he did or didn’t do and he could have done better," he said. "But it had nothing to do with what happened at that jail, nothing at all."