Nearly three months after a San Bernardino police officer was shot in the head and said to be “fighting for his life,” officials said Friday he had been released from the hospital and taken to a rehabilitation center.

Gabriel Garcia, who was 31 years old at the time of the Aug. 22 incident, was training a fellow officer when the two men approached a group of people and at least one person opened fire using an AK-47 and handgun.

Garcia was shot in the head and the trainee officer, who had not been identified, returned fire, killing the alleged shooter, 38-year-old Alex Alvarado.

The 6 1/2-year department veteran was hospitalized and listed in critical condition following the shooting. His survival was very much in doubt at the time, and he placed into a medically induced coma.

On Sept. 8 officials said he had been taken out of the coma and was breathing on his own.

 “It will take about six months to a year before we know what his recovery is, but he is recovering,” Arrowhead Regional Medical Center chief of surgery Dr. Dev Gnanadev said at the time.

Garcia left the Colton-area hospital and was taken to the Casa Colina Centers for Rehabilitation in Pomona Thursday around 11 p.m., San Bernardino Police Department spokesman Lt. Rich Lawhead said.