SAN ANTONIO (CN) – Two sheriff’s deputies in San Antonio will face a civil trial for excessive force claims over the 2015 shooting death of an unarmed, shirtless man who had his hands up, which gained national attention when a bystander’s video went viral.

U.S. District Judge Robert Pittman found Wednesday that immunity is not available to Bexar County Sheriff’s Office Deputies Greg Vasquez and Robert Sanchez, who shot and killed 41-year-old Gilbert Flores while he raised his hands in the air and remained motionless, with a knife in one hand.

“The deputies’ use of deadly force was not reasonable,” Pittman concluded in his ruling, which dismissed Bexar County from liability.

“Based on the circumstances facing Vasquez and Sanchez right before they shot Flores and construing the facts in favor of plaintiffs, the court finds that a reasonable officer would have concluded that Flores, who was stationary for several seconds and put his hands in the air while remaining otherwise motionless, was no longer resisting and had signaled surrender,” Pittman’s 25-page ruling states.

The judge wrote that while Flores may have posed an immediate and significant threat of harm at some previous point during the encounter, “an exercise of force that is reasonable at one moment can become unreasonable in the next if the justification for the use of force has ceased.”

Charles Frigerio, an attorney for the deputies, said he planned to appeal the judge’s ruling at a pretrial conference on Thursday morning. An Oct. 23 trial in San Antonio federal court was canceled as a result.

The deadly encounter unfolded moments after police were summoned to the Flores home for a domestic disturbance call on Aug 28, 2015. 911 dispatch advised officers that Flores was upset and had indicated that he wanted to commit “suicide by cop.”

Much of Pittman’s ruling revolves around video shot by a neighbor, which shows the approximately eight minutes before the shooting. The deputies did not have body cameras.

When deputies arrived, a woman with a cut to her head and a child who was also hurt were inside the home. Flores then became involved in a standoff with the two deputies, where he tried to stab one of them, thwarted their efforts to use a stun gun on him, and retrieved two metal folding chairs from inside the home.

By the end of the video, Flores appears to surrender as he is seen stationary in the driveway, with his arms up in the air.

The ruling states that Flores was motionless for several seconds before the deputies looked at each other, “and, according to their testimony, the deputies agree that they were going to end it.”

Vasquez and Sanchez both shot at the man, who collapsed backward onto the pavement.

The lawsuit filed by Flores’ family a month after the shooting says officers left him dying, without assistance. They seek damages for excessive force.

The judge said in his ruling that while he considered the circumstances the officers encountered, he focused in on the moment before the deputies fired their fatal shots at Flores.

Pittman also found that Flores’ family was unable to prove that Bexar County’s policies were inadequate, or that it failed to properly train its officer.

In December 2015, a Bexar County grand jury found no cause to bring criminal charges against Vasquez and Sanchez.