MODESTO (CBS13) — Officer Michael Rokaitis, a Modesto police officer who was shot in the line of duty, is said to be doing well after having his leg amputated earlier this week.

Officer Rokaitis was serving a search warrant earlier in August when he was shot twice: once in his bullet-proof vest and once just below, hitting the artery to his right leg.

READ MORE: Fire Burning In Highway 160 Overpass Reveals Person Living Inside

On Saturday, the Modesto Police Department posted that Rokaitis was now awake and spending time with loved ones after the surgery.

The incident started when a motorcyclist was spotted driving recklessly and fled from an attempted traffic stop. A Stanislaus County sheriff’s Office helicopter followed the motorcycle to a Modesto home.

READ MORE: Rio Linda Crash Leaves 1 Dead, 2 Injured

Officers responded to the home and the motorcyclist eventually surrendered. After finding drugs on the motorcyclist, officers obtained a search warrant for the home and entered shortly after 11:30 p.m. The gunman, 42-year-old Jesse James Brooks of Modesto, was in the home and opened fire on the officers.

Brooks received minor injuries when officers returned fire, was treated at a local hospital, and released back into police custody. He was arrested for various weapons violations and three counts of attempted murder of a police officer.

MORE NEWS: Citrus Heights Police Investigating Saturday Night Homicide

No other officers were injured in the shooting.