A judge denied bond for ex-Fairfax officer Adam D. Torres on Wednesday, who is charged with second-degree murder in the fatal shooting of an unarmed Springfield man in 2013. (WUSA9)

A former Fairfax County police officer charged with shooting and killing an unarmed Springfield, Va., man in 2013 was “deteriorating” mentally before the fatal encounter, a prosecutor said in a bail hearing Wednesday.

Adam D. Torres, who was on duty when he shot John Geer during a standoff after a domestic disturbance call, was denied bond and appeared to faint a short time later during his first court appearance on a charge of second-degree murder.

Commonwealth’s Attorney Raymond F. Morrogh argued against bond, telling a Fairfax County Circuit Court judge that Torres was upset before the shooting and had told supervisors that his wife had cheated on him and traveled to Hawaii with a boyfriend.

On another occasion, Morrogh said Torres had been sent home from work because he was “upset and disoriented.” Morrogh also said Torres went home sick one day, but supervisors later learned that he was spending time with family.

The disclosures drew gasps from Torres’s wife and parents, who sat in the front row of the courtroom, and Torres appeared angry and leaned over to consult with his attorney. Torres did not address the court during the hearing.

Morrogh did not mention it at the bond hearing, but Torres had also cursed repeatedly at one of Morrogh’s assistants at the courthouse in March 2013 after a trial unrelated to the shooting. The incident prompted police brass to apologize.

At Wednesday’s hearing, Morrogh said he had never seen another police shooting like Geer’s.

Torres “shot a man with his hands up, and that makes him dangerous,” Morrogh said.

Torres’s attorney, John Carroll, argued for setting a bond, saying his client shot Geer while carrying out his duty to protect the community. Carroll said that Geer was a threat and that Torres was not a flight risk because he had strong ties to the area. Torres grew up in Fairfax County, has two children and owns a home in Culpeper County.

“Officer Torres was duty-bound to investigate what was going on,” Carroll said. “When he finds Geer had a gun, he is further duty-bound to ensure no one gets hurt.”

The incident began on the afternoon of Aug. 29, 2013, when officers were called to Geer’s home for a report of a domestic disturbance. Geer, 46, was throwing his partner’s possessions on the front lawn after they had argued.

When officers approached, Geer showed them a holstered gun and said he was not afraid to use it, before placing it on the ground, officers later told investigators. An officer began negotiating with Geer to get him to leave the house, but he refused and stood in his doorway with his hands resting on top of a storm door .

Former Fairfax County police officer Adam D. Torres is shown in this police department photo released on Aug. 17, 2015. (Fairfax County Police Department/Reuters)

After 42 minutes, Torres fired a single shot at Geer, startling the other officers. Geer was hit and retreated inside the home. Police waited 70 minutes to enter the house and found Geer dead.

Carroll said in court that Torres shot Geer because he saw him quickly move his hands toward his waist, possibly to grab for a gun.

But four other officers at the scene, Geer’s father and a friend, who were also there, contradicted that account in interviews with investigators and said Geer had his hands up above his shoulders when he was shot.

Judge Stephen C. Shannon said he would not grant bail to Torres because of the circumstances of the shooting and the concerns about Torres’s mental state at the time of the incident.

Shortly after, as Shannon was setting a trial date, Torres appeared to faint and fell backward to the floor. He was surrounded by sheriff’s deputies and was speaking to them. The hearing was suspended for about 25 minutes, and Torres was taken to a hospital. Morrogh said Torres appeared to be in good shape.

The hearing resumed without Torres, and Shannon set a Dec. 14 trial date before adjourning.

On Monday, a Fairfax special grand jury indicted Torres in Geer’s killing. The county police department fired him at the end of July. Torres turned himself in shortly after the indictment.

The killing has stirred protests in Fairfax and prompted county officials to review how the police department uses force and communicates about police shootings with the public.

On Wednesday, Torres appeared in court in a green jail jumpsuit and showed little emotion during most of the hearing. Afterward, his wife and family declined to comment.

Jeff Stewart, the friend of Geer’s who witnessed his shooting, said he was gratified that the legal process was finally beginning two years after his friend was killed.

“It’s about time,” Stewart said. “It’s been a lot of hard work. Hopefully, the process will move forward now.”