Robots have been used for everything from greeting bank customers to grabbing a slice of pizza — and now they seem to be venturing further into law enforcement.

A six-hour police standoff in a Southern California desert ended on Sept. 8 when a robot was used by police to take away the rifle of an attempted murder suspect.

The special weapons team from the Los Angeles Sheriff's Department made the call after the suspect, 52-year-old Ray B. Bunge, refused to surrender. He has since been charged with attempted murder, criminal threats, assault with a deadly weapon / firearm, robbery and felony vandalism.

SEE ALSO: 100 tiny robots replaced humans in this queue for the iPhone 7

During the standoff, Bunge was lying in a "dark open field" in the desert of Antelope Valley, California, when the robot stealthily, quietly snatched the gun sitting next to his feet, according to a Facebook post from the Los Angeles Sheriff's Department.

Police had lost track of Bunge before using a helicopter and special weapons team to find him in a dirt area surrounded by shrubs and fence wiring. That's when they tried distracting Bunge and sending in the robot.

"He looked up and realized his gun was gone and he was exposed."

"While his attention was focused on the vehicles in front of him, the team deployed a robot from behind the suspect’s position," the Facebook post explains.

The robot picked up the gun without Bunge noticing before pulling away the fence wiring that had been covering him. At that moment, Bunge finally gave up.

"He looked up and realized his gun was gone and he was exposed," the post states. "The suspect surrendered to the team without incident."

The use of robots by police has been a point of controversy since Dallas police used a robot to kill a suspect who had murdered five police officers in July.

While robots have been used by police to dispose of bombs for years, using them as a killing weapon seemed to set a new precedent — something confirmed by Peter Singer, a robotics expert with the think tank New America Foundation.

Yes, this is 1st use of robot in this way in policing. Marcbot has been ad hoc used this way by troops in Iraq. https://t.co/FfrsgLS2x1 — Peter W. Singer (@peterwsinger) July 8, 2016

A UC Davis law professor who has studied American law enforcement's use of technology told the Associated Press that using a robot to kill could blur the lines of appropriate or ethical use.

"If lethally equipped robots can be used in this situation, when else can they be used?" Elizabeth Joh said. "Extreme emergencies shouldn't define the scope of more ordinary situations where police may want to use robots that are capable of harm."

One thing's for sure: There are reportedly hundreds of police robots across the U.S. and no telling what they'll be used for next. The Los Angeles Sheriff's Department said this was one of "very few known" instances where a remotely controlled robot was used to take a weapon.

"Although this method cannot be used in every incident, the use of robot technology in this instance has proven the safety of all involved," the department wrote in its Facebook post.