The San Diego County Sheriff’s Department Tuesday released video footage of a patrolman’s non-fatal shooting of a suspect who allegedly advanced on deputies with a pellet rifle in his hands while trying to evade arrest in Vista six weeks ago.

Deputy Justin Williams, a then-11-month member of the regional law enforcement agency, shot 20-year-old Omar Rojas in front of a home in a neighborhood just south of Vista High School.

Rojas was treated at a hospital for two days before being booked into county jail, where he awaits trial on charges of assault with a deadly weapon on a peace officer, resisting arrest and vandalism.

The events that led to the shooting began shortly before 12:30 p.m. Sept. 28, when a 911 caller reported that an apparently drug-addled man — later identified as Rojas — had just threatened him with a knife at a 7-Eleven store in the 1500 block of North Santa Fe Avenue and then slashed two tires on the victim’s car, according to sheriff’s officials.

By the time patrol personnel arrived at the business, Rojas — described by the victim as seemingly high on some sort of drug, possibly methamphetamine — was gone. Witnesses pointed them in the direction in which the suspect had fled, and deputies set up a perimeter and began searching the neighborhood.

About a half-hour later, deputies found Rojas a short distance to the east of the convenience store, armed with a knife in the backyard of a house in the 1500 block of Kiva Lane.

As the deputies tried to get the suspect to drop the weapon and surrender peaceably, they saw that he had picked up a long-barreled rifle, which later was determined to be a pellet gun, according to sheriff’s officials.

Rojas ignored repeated commands to drop the weapon, sheriff’s officials said. Eventually, still armed, he walked toward the street where deputies were hunkered down behind a parked SUV, prompting Williams to fire about a dozen rounds at him.

Williams’ uniform-worn camera and those of his fellow deputies did not capture images of the suspect being shot, since the personnel were using the vehicle as cover. Following the shooting, however, a camera aboard a sheriff’s patrol helicopter recorded video of the bloodied suspect lying face-down alongside the home, with the pellet gun and two knives strewn around him.

As is standard protocol in cases of deputy-involved shootings, Williams was transferred to desk duty while investigations in the case got underway. He has since returned to full duty, according to sheriff’s officials.

City News Service contributed to this article.