The convicted rapist accused of critically injuring two California correctional officers on Saturday morning during a jailhouse shooting was booked on charges of attempted murder as his alleged victims clung to life Sunday.

Thong Vang, 37, was also charged with being a felon with a handgun and bringing drugs into a jail, The Fresno Bee reported.

Correctional Officers Juanita Davila and Toamalama Scanlan remained in critical condition on Sunday morning after they were struck in the head and neck area during Saturday’s incident near a secure area of the Fresno County Jail.

Officials said Vang opened fire in a lobby area where about 15 people were gathered. Vang, who entered the area at 8:30 a.m. to visit someone, exhibited odd behavior, including pacing back and forth and attempting to cut a line of people, Sheriff Margaret Mims told The Bee.

As Davila tried to get Vang to sit down, Vang pulled out a gun and began shooting, Mims said.

Neither corrections officer was armed. Both had at least 10 years of experience in the county.

Officers attempting to subdue Vang used a stun gun to no effect before firing shots at him, Mims said. The alleged shooter eventually gave up and said he wanted to be arrested, Mims said.

The injured officers were dragged out of the lobby and taken to the hospital to undergo surgery.

Vang was hospitalized for minor scrapes and cuts.

Sheriff's spokesman Tony Botti said Vang was released from prison in 2014 after serving 16 years for raping minors aged 14 and under. The parolee had no criminal violations since his release.

The Associated Press contributed to this report.