Virginia Gov. Terry McAullife stands outside the Hylton Chapel as an honor guard places a casket carrying Officer Ashley Guindon into a hearse. (Reza A. Marvashti /For The Washington Post)

A former Pentagon information-technology specialist accused of fatally shooting his wife and then a police officer who responded to a 911 call at his Northern Virginia home asked an investigator to kill him soon after he’d been handcuffed.

Shortly after authorities say Army Staff Sgt. Ronald “Ronnie” Hamilton killed his wife, Crystal Hamilton, 29, and police officer Ashley Guindon, 28, on Feb. 27, he was placed in the back seat of a police cruiser. He waived his Miranda rights and agreed to answer questions from a Prince William police sergeant.

“He said, ‘I ruined my life. Take your gun out and shoot me now,’ ” Sgt. Joey Medawar recalled of his conversation with Hamilton. “I said, ‘I’m not going to shoot you. Help me understand what happened.’ ”

Medawar recounted the conversation as he testified Tuesday in Prince William County General District Court. A judge ruled that there was enough evidence for a grand jury to consider whether to indict Hamilton on charges including capital murder in the killing of the police officer and first-degree murder in the death of Hamilton’s wife.

In an interview after the hearing, County Commonwealth’s Attorney Paul Ebert said he was “likely” to pursue the death penalty against Hamilton, 32.

Ronald W. Hamilton is charged with killing his wife, Crystal Hamilton, and Prince William County Police Officer Ashley Guindon on Feb. 27. (Prince William County Police)

In a candid discussion with Medawar shortly after being arrested, Hamilton admitted to the killings, according to the sergeant’s testimony. He said he shot his wife because they were “arguing,” although Medawar had not pressed Hamilton on why the couple were fighting. Hamilton told the sergeant that he opened fire on Guindon, along with two other officers, because they were “storming” Hamilton’s Woodbridge home, Medawar said.

Medawar asked him why he shot the officers.

“He thinks he may have snapped and that he has PTSD,” the officer testified, referring to post-traumatic stress disorder, and noted that Hamilton had said he had served in Iraq and Afghanistan. (Hamilton’s official military record shows that he served only in Iraq.) Medawar said that he asked Hamilton whether a doctor diagnosed PTSD and that Hamilton said no, “but he thinks he has it.”

The shootings prompted an outpouring of anguish across the Washington region, particularly because Guindon had just become an officer and was killed on her first day on the street. Guindon’s death marked the first killing of a Prince William police officer since 1990. The two other officers were wounded.

Thousands of people, including law enforcement officers and others who didn’t even know Guindon, paid their respects at a memorial ceremony in early March at the Hylton Memorial Chapel in Woodbridge. Two weeks later, a vigil was held for Crystal Hamilton at the Marine Memorial Chapel in Quantico. Many people spoke about the care she had given their sick or wounded relatives as part of her job at Walter Reed National Military Medical Center in Bethesda.

During Tuesday’s hearing, Medawar also testified that Hamilton expressed surprise that he hadn’t been killed by the officers who arrived at his home that evening. “He thought the officers were going to shoot him. He said, ‘The officers showed a lot of restraint,’ ” Medawar said. The sergeant asked him, “Were you trying to commit suicide by cops?” Hamilton said no, according to Medawar.

It’s not clear what precisely prompted Hamilton to allegedly open fire on his wife. The couple’s 11-year-old son, Tyriq, was in the house. Hamilton’s father, a retired major from the police department in Charleston, S.C., who also is named Ronald W. Hamilton, has said his son was depressed after two tours of duty in Iraq, in 2003 and 2005.

Crystal Hamilton’s sister, Wendy Howard, told The Washington Post this month that Ronald Hamilton never served in a combat role because he was an IT specialist.

A family member close to the couple — who met while growing up in South Carolina — told The Post that Hamilton admitted to his wife around Christmas that he had had an affair with another woman and that she had decided to leave him and seek full custody of their son. The relative also told The Post that Hamilton was jealous of his wife’s friendships with men she worked with at Walter Reed and worried that she was having an affair.

On the night of her killing, Crystal Hamilton was supposed to go out for a girls’ night with friends. Her husband insisted that she stay home, but she refused, relatives said. Howard told The Post that the couple’s son saw his father throw Crystal Hamilton up against a wall with such force that a television fell down. After Crystal Hamilton told Tyriq to flee the house, he heard two loud gunshots on his way down the stairs, Howard said, followed by his mother’s silence.

During Tuesday’s hearing, Medawar said Hamilton seemed remorseful sitting in the police cruiser. He asked the sergeant one question that stuck out:

“Are the officers okay?”

Medawar said he did not respond.