MODESTO (CBS13) — A Modesto police officer shot in the line of duty may lose part of his leg.

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

READ MORE: Footage Released Of Carjacking Suspect's Assault On Sacramento Sheriff's Deputy

According to a Facebook post by his wife, they are hopeful his leg will only be amputated below the knee to ensure more mobility in the future.

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: President Biden Releases Federal Funds To Aid Fire Hose Shortage In California

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: Thief Takes Off With Antelope Woman’s Bright Yellow Cotton Candy Trailer

No other officers were injured in the shooting.