SAN JOSE — For the second time in two years, a jury deadlocked Thursday in the trial of a former San Jose police officer charged with raping a woman while on duty in 2013.

The jury hung 9-3 in favor of convicting Geoffrey Graves in contrast to the first trial where the jury leaned toward acquitting him.

Graves, 42, broke down in tears as Judge Paul Colin surveyed the six women and six men on the jury on whether their deadlock was irreconcilable. Graves — who is out on bail — declined comment as he left the San Jose courtroom.

Jury foreman Chris Wellwood — one of the three who favored acquitting Graves — said while he recognized it was unethical for the officer to have engaged in sex on the job, he remained unconvinced that a rape had occurred. Graves has insisted that the sex with his accuser was consensual.

“It came down to morals versus criminality,” Wellwood said. “I couldn’t find the proof behind what was alleged. Was it unethical? Hands down, yes. But was it criminal? In my opinion, no.”

It would be rare for the case to be tried a third time, and there was no immediate indication that the Santa Clara District Attorney’s Office was leaning that way.

“A decision will be made in the coming days,” Deputy District Attorney Carlos Vega said after Thursday’s hearing. “We’re obviously disappointed in the result. However, we thank the efforts of the jury for working so hard to reach a verdict.”

Vega, who prosecuted Graves in the first trial in 2016, centered his second case around how Graves admitted to lying to SJPD internal affairs investigators after the rape allegation was made. That resonated with one juror who said she favored conviction.

“This guy lied through his teeth throughout the interviews,” said the juror, who asked that her name be withheld due to privacy concerns. “The credibility was a big thing for me.”

Graves, who was fired from SJPD in September 2015, was among a team of four officers who responded to a disturbance call in the middle of the night on Sept. 22, 2013, at an apartment where a woman was in a drunken argument with her husband.

No crime occurred, but the woman asked to be taken to the Marriott TownePlace Suites hotel, where she worked as a maid. Graves and another officer escorted her to the hotel. Three weeks later, during an unrelated traffic stop by the California Highway Patrol, she reported that Graves came to the room and raped her, saying she was initially afraid to report it because she was in the country illegally, and also was afraid her husband would reject her and that police would retaliate.

Graves initially denied during interviews with investigators that he had sex with the woman until he learned that her DNA was found on his bulletproof vest. He testified that he lied because he was afraid of being fired.

Vega argued that Graves had selected a “perfect victim” who was particularly vulnerable because she was undocumented, faced a language barrier, had been drinking, and was emotional after a fight with her husband.

Deputy Alternate Public Defender Kristin Carter scrutinized Grave’s accuser’s credibility and asserted the woman twisted what was a consensual, extramarital one-night stand into a purported rape to avoid a DUI arrest, obtain a visa to stay in the country, and possibly extract a monetary settlement out of the case.

Carter said she is withholding comment on the case until it is fully resolved. The outcome would become final if the DA formally declines to retry the case, or if the judge were to grant a defense request to dismiss the charges.

Graves is still facing charges related to a domestic violence case involving an ex-girlfriend, a San Jose police dispatcher who had testified in the rape case and had accused him of violent behavior.

The juror who favored conviction acknowledged that there “were a lot of holes” in the accuser’s story, but “could not get past” Graves’ admitted dishonesty and the unbalanced power dynamic between him and the woman.

“He’s a cop, in uniform, with a gun,” she said. “It was frustrating. I’m sorry I could not get her justice. I tried.”