A Las Vegas police officer was shot Sunday in an ambush attack as he sat with his partner in his squad car, KTNV reported.

The suspected gunman is in custody, the Las Vegas Metropolitan Police Department tweeted.

Two officers were leaving the scene of a disturbance call at a .99 Cents Only store when an individual walked up to their patrol car while it was stopped at a traffic light and fired three shots, striking one of the officers in the hand, KTNV reported.

Police did not return fire during the encounter, which occurred shortly after noon, local time. The officer who was shot is expected to survive; he has not yet been named.

The gunman used a semi-automatic handgun, the Las Vegas Review-Journal reported. Police pursued the alleged shooter on foot until he dropped his weapon and surrendered, according to Metro Sgt. John Sheahan.

A witness at the scene of Sunday's shooting told the Review-Journal that the alleged gunman "didn't resist or put up a fight" when cops caught up to him.

This is the second shooting of a police officer in three days in Las Vegas. A cop was shot in the leg on Friday while responding to a report of a prowler. Since that incident, Las Vegas officers have been riding in pairs in patrol cars, Sheahan said.

The news comes following the murders of officers in Texas and Illinois in the past two weeks. Texas Sheriff’s Deputy Darren Goforth was killed as he filled his cruiser with gas on Aug. 28. Goforth was shot from behind; his assailant unloaded 15 bullets, according to authorities. Shannon Miles is charged with capital murder in the case.

In Illinois, Fox Lake Lt. Joe Gliniewicz, 52, was found shot to death Sept. 1. Gliniewicz, a 30-year police veteran who was planning to retire at the end of the month, contacted dispatchers about three suspicious men he was pursuing and requested a second unit. Dispatchers soon lost contact with him, and backup officers found Gliniewicz about 50 yards from his squad car with a gunshot wound. He died soon after. Police are still on the hunt for his killers.