The alleged gang member who nearly killed a Fremont (Calif.) Police officer received two life terms from an Alameda County judge.

Andrew Barrientos, 21, was convicted in November of attempted murder of a police officer, assault on an officer and weapons charges in the August 2010 shooting of Officer Todd Young, reports the San Francisco Chronicle.

While working undercover, Officer Young was struck by two rounds from Barrientos. The officer, who required 60 units of blood during surgery, said he plans to return to full duty in the summer.