NEW YORK — The trial of an off-duty New York City police officer convicted of sexually assaulting a schoolteacher who testified against him ended Wednesday with the jury deadlocked on remaining rape charges.

Jurors failed to reach a verdict on two counts of rape and two related charges against Michael Pena following five days of often tense deliberations in state Supreme Court in Manhattan.

The jury convicted Pena on Tuesday of other charges including predatory sexual assault, which carries a potential life sentence.

"I want to first commend the victim for her bravery, and thank the jury for its service," District Attorney Cyrus Vance said in a statement.

Vance gave no indication of whether prosecutors would seek to retry Pena on the unresolved charges.

"I certainly hope they don't make us, including the victim, all go through this again," defense attorney Ephraim Savitt said outside court.

Asked about his client's reaction to the partial verdict, Savitt said: "Nobody's happy about any of this. It's a very sad case. We don't feel there's a victory for anyone here."

The woman testified that a drunken Pena grabbed her off the street, forced her into an Upper Manhattan apartment building courtyard and raped her at gunpoint last August. She was on her way to her first day of work at a teaching job.

The defense said Pena acknowledges attacking the woman but never had intercourse with her.

The 27-year-old Pena, an officer for three years, was suspended by the New York Police Department following his arrest. The NYPD fired him on Tuesday.

Jurors had told the judge in a note late Tuesday morning that they remained stuck on the rape charges, and deliberations were becoming very contentious, Savitt said.

The judge instructed them at the end of the day "to be respectful of one another" and keep deliberating. But he announced Wednesday that he was ending the trial.

Pena is set to be sentenced on May 7.