A California sheriff's deputy shot a suspected shoplifter in the head as he appeared to reach for a gun during a violent struggle, video shows.

The footage, released Tuesday by the Orange County Sheriff's Department, shows suspect Ernesto Aguilar, 30, being escorted out of Walmart in Lake Forest on Jan. 19 after an employee called cops to report a possible theft.

As Aguilar and a woman with him were asked to leave the store, one of the responding deputies spotted that he had a knife, the footage shows.

"Don't reach for it," another deputy said. "Get your f–king hand off the knife."

"Sorry, sorry, sorry, sir," Aguilar responded.

Deputies then tried to get Aguilar into handcuffs when he restarted resisting, setting off an intense struggle that ended with him on the ground and a bullet in his head after he appeared to reach for a gun on his hip, the clip shows.

"He's got a gun, he's got a gun," one deputy yelled out. "Shoot him, shoot him!"

A man shot in the head by an Orange County sheriff's deputy this year appeared to reach for a handgun.
A man shot in the head by an Orange County sheriff's deputy this year appeared to reach for a handgun.
Orange County Sheriff's Depart
A man shot in the head by an Orange County sheriff's deputy this year appeared to reach for a handgun during a struggle at a Walmart in Lake Forest, authorities said Tuesday as they released footage of the incident.
The footage appeared to show Ernesto Aguilar with his hand on a gun.
Orange County Sheriff's Depart
A man shot in the head by an Orange County sheriff's deputy this year appeared to reach for a handgun during a struggle at a Walmart in Lake Forest, authorities said Tuesday as they released footage of the incident.
"He's got a gun, he's got a gun," one deputy yelled out.
Orange County Sheriff's Depart
A man shot in the head by an Orange County sheriff's deputy this year appeared to reach for a handgun during a struggle at a Walmart in Lake Forest, authorities said Tuesday as they released footage of the incident.
One of the responding deputies spotted that he had a knife.
Orange County Sheriff's Depart

The footage showed a third deputy then fire a single shot into Aguilar's head as a civilian at the Walmart looked on.

"Shoot him, shoot him," the man said. "Nice, nice, nice."

The footage released Tuesday appeared to show Aguilar with his hand on a gun during the ensuing scuffle to get him into handcuffs.

A man shot in the head by an Orange County sheriff's deputy this year appeared to reach for a handgun during a struggle at a Walmart in Lake Forest, authorities said Tuesday as they released footage of the incident.
Orange County prosecutors are investigating the shooting.
Orange County Sheriff's Depart
A man shot in the head by an Orange County sheriff's deputy this year appeared to reach for a handgun during a struggle at a Walmart in Lake Forest, authorities said Tuesday as they released footage of the incident.
Ernesto Aguilar had surgery at a hospital following the shooting.
Orange County Sheriff's Depart
A man shot in the head by an Orange County sheriff's deputy this year appeared to reach for a handgun during a struggle at a Walmart in Lake Forest, authorities said Tuesday as they released footage of the incident.
Ernesto Aguilar remained in custody in lieu of bail set at nearly $2.3 million.
Orange County Sheriff's Depart

Aguilar, who pleaded for help as he said he was "dying," miraculously survived, the Los Angeles Times reported. He was later charged with assault on a peace officer and possession of a gun missing a serial number, sheriff officials said.

Aguilar, of Santa Ana, who had surgery at a hospital following the shooting, was recovering in jail Tuesday, the Orange County Sheriff's Office told the Los Angeles Times. He remained in custody in lieu of bail set at nearly $2.3 million, county records show.

Orange County prosecutors, meanwhile, are investigating the shooting to determine if the involved deputies acted within the law and department policy, Undersheriff Jeff Hallock said.

A man shot in the head by an Orange County sheriff's deputy this year appeared to reach for a handgun during a struggle at a Walmart in Lake Forest, authorities said Tuesday as they released footage of the incident.
The footage shows suspect Ernesto Aguilar, 30, being escorted out of Walmart in Lake Forest on Jan. 19.
Orange County Sheriff's Depart
A man shot in the head by an Orange County sheriff's deputy this year appeared to reach for a handgun during a struggle at a Walmart in Lake Forest, authorities said Tuesday as they released footage of the incident.
Deputies tried to get Ernesto Aguilar into handcuffs when he restarted resisting.
Orange County Sheriff's Depart
A man shot in the head by an Orange County sheriff's deputy this year appeared to reach for a handgun during a struggle at a Walmart in Lake Forest, authorities said Tuesday as they released footage of the incident.
Ernesto Aguilar and a woman with him were asked to leave the store.
Orange County Sheriff's Depart

"A deputy-involved shooting demands the highest level of scrutiny and rightfully is a matter of public concern," Hallock said of the ongoing probe.