"Yes," the boy replied.
Then he got out of the car and put a handgun to his head. The deputy pulled out his own weapon, ordering the young man to drop the gun.
Instead, the boy pulled the trigger, firing a single bullet into his skull as the deputy and his own mother watched in horror. He was taken to the hospital in critical condition and later died.
Reports have conflicted about whether the boy is 17 or 18 years old.
The nightmare in Katy, Texas, had begun hours earlier, when the teenager - who has not been identified -allegedly got into an argument with another man about a girl they were both dating, Harris County sheriff's Sgt. Cedrick Collier told the Associated Press.
Darian Mitchell, who is friends with the suspect, said that the two were hanging out at his house when the teenager got a call from his girlfriend.
"He was like, 'What are y'all doing?' and she said, 'I'm cheating on you right now.' He got so mad so he kept yelling. He told her and her boyfriend to come meet us, to talk," Mitchell told KHOU. "I don't know why he was tripping over this one girl, but it was not worth it."
The woman and the other man, who friends identified as 25-year-old Army veteran James Ayala, drove up to Mitchell's house just after midnight. There was an argument, then the suspect pulled out a gun, fatally shooting Ayala, Mitchell said.
Two men were seen fleeing the scene of the shooting in a white car, officials told the Houston Chronicle.
When the boy's mother found out what happened, she argued that he needed to turn surrender to the police, according to the Chronicle. She drove him to the sheriff's substation around 5:30 Sunday morning.
Then the unthinkable happened.
Collier told the Associated Press that the mother spoke to authorities after her son shot himself.
"She's obviously destroyed because she just witnessed her son commit suicide in front of her," he said.
The deputy who witnessed the shooting has been placed on administrative leave so he can "clear his head and make sure he's OK" before returning to work, Collier added. The deputy did not fire his weapon during the incident.
The killing is still under investigation, the Chronicle reported.
Aaron Summerour, a neighbor of the teenager who killed himself, told KHOU that the boy went to nearby Morton Ranch High School. He had once been "mixed up with the wrong crowd," the TV station said, but was starting to turn his life around.
"He sounded like he was doing good. He had a job, he was getting his car. He had everything together and now that I hear this, it's unreal, you know what I mean?" Summerour said.
Ayala, the 25-year-old victim, was a father of five and a "standout guy in the Army," Jordan Downhour told the Houston Chronicle.
Downhour had been stationed with Ayala in Fort Stewart in Georgia. Ayala left the Army as a corporal E-4 a few years ago.
"He took me under his wing and picked me up in Brigade. He showed me all the ropes," Downhour said. ". . . I wish he would've stayed in. I think this wouldn't have happened."
Ayala's family members were reluctant to speak with KPRC, another local TV station - they were too distraught, reporter Bill Spencer said.
But one relative, recalling how Ayala had served in Iraq, said this: "It's so sad and crazy that he risked his life all of that time defending our country, only to come back here and be murdered by some kid with a gun."
Where to get help:
• Lifeline: 0800 543 354 (available 24/7)
• Suicide Crisis Helpline: 0508 828 865 (0508 TAUTOKO) (available 24/7)
• Youth services: (06) 3555 906
• Youthline: 0800 376 633
• Kidsline: 0800 543 754 (available 24/7)
• Whatsup: 0800 942 8787 (1pm to 11pm)
• The Word
• Depression helpline: 0800 111 757 (available 24/7)
• Rainbow Youth: (09) 376 4155
• CASPER Suicide Prevention
If it is an emergency and you feel like you or someone else is at risk, call 111.