Updated

A New Mexico man was arrested for allegedly beating his girlfriend and threatening to kill her — after Amazon’s Alexa called police, authorities said.

Eduardo Barros, 28, became angered with his unidentified girlfriend while housesitting in Tijeras, about 15 miles east of Albuquerque, and the dispute suddenly turned physical on July 2, authorities said.

During the assault, Barros waved a gun and threatened to kill the woman before he allegedly asked: “Did you call the sheriffs?”

The question was inadvertently picked up by the smart speaker and the voice-powered virtual assistant recognized the phrase as a command — prompting it to call 911, Bernallillo County Sheriff’s Department

Deputy Felicia Romero confirmed to The Post on Monday.

AMAZON ECHO VS. GOOGLE HOME IN A VIRTUAL STANDOFF

It’s unclear whether the speaker was connected to an Amazon Echo or Echo Dot device, but the Alexa virtual assistant was connected to a landline in the home, Romero said.

The violent ordeal unfolded after Barros allegedly got upset over a text message the woman received and accused her of cheating on him, KRQE reported.

“Barros told her she was not going anywhere and he was going to kill her,” according to an arrest warrant affidavit obtained by The Post. “When 911 called her phone, Barros saw the caller ID and threw [her] to the floor. Barros then kicked her while on the ground at least 10 times in the face and stomach. Barros told [the victim] he could not believe the cops had been called and he was not going back to prison and that she knew he was a felon. [The victim] stated she thought she was going to be killed or shot.”

Responding deputies managed to remove the woman and her unidentified daughter from the home. She received minor injuries during the incident, but was not hospitalized. Her daughter was not harmed, Romero told ABC News.

HOW TO LISTEN TO EVERYTHING AMAZON ECHO HAS EVER HEARD

Barros, a convicted felon, was later taken into custody after a crisis negotiation team and a SWAT team were called to the residence. He was ordered held without bail on charges that include possession of a firearm, aggravated battery and false imprisonment.

“The unexpected use of this new technology to contact emergency services has possibly helped save a life,” Bernalillo County Sheriff Manuel Gonzales III told ABC News. “This amazing technology definitely helped save a mother and her child from a very violent situation.”

This story orginally appeared on the New York Post.