A woman who says she was repeatedly raped by a guard at the federal jail in Brooklyn broke down in tears when she was asked to identify accused Lt. Carlos Martinez at the start of his Brooklyn federal court trial on Tuesday.

“I can’t,” said the 31-year-old Dominican former prisoner, who is being referred to as “Maria” to preserve her privacy, as she declined to look across the courtroom at Martinez.

After composing herself, she did identify a picture of Martinez and over four hours of wrenching testimony described how he first forced her to perform oral sex and raped her on a desk in a deserted office in 2015, told her the sex was safe because he had a vasectomy, and later smuggled a “ morning after pill” to her.

“It was the worst thing that ever happened to me,” said the woman, who was serving a three-year sentence for acting as a drug courier at the Metropolitan Detention Center. “He killed me inside.”

Martinez, 47, of Brooklyn, was one of three officers charged last year with sexual misconduct toward inmates in separate incidents at the MDC, which even before those cases had sparked concerns among magistrates in Brooklyn over poor conditions for female inmates.

An ex-Marine who prosecutors said was an in-house trainer of guards’ responsibilities under the federal Prison Rape Elimination Act, Martinez is charged with 20 counts of depriving the woman of her civil rights and sexual abuse.

During her testimony, the victim said she got less sympathy than she expected from other female inmates — some of whom said she was lucky to be getting sex in prison — and didn’t report the attacks until she was released because Martinez warned it could get her in trouble and increase her jail time.

“I didn’t want any problems,” the woman, speaking through a Spanish interpreter, told prosecutor Nadia Shihata. “I didn’t want to be there a single day longer . . . He’s a man who has a certain position. Who’s going to believe a person who’s a criminal versus a person who has a position, a life. No.”

In opening statements, defense lawyer Anthony Ricco attacked the credibility of “Maria,” telling jurors she made conflicting statements about her life history at her sentencing and in an immigration proceeding, only disclosed the alleged attacks when she faced deportation, and had filed a $20 million lawsuit.

Ricco did not specify whether Martinez denies there was sex or says it was consensual, but said, “Let’s be sure manipulation, guile and scheming fails in this court.”

Prosecutor Shihata told the jury the case was about “power and abuse,” and said the government would corroborate the victim’s allegations with evidence that Martinez bought anti-pregnancy pills at a Rite Aid near his home on the evening of the alleged rape.

“He even used his Rite Aid rewards card to get a $5 discount,” she said.

Testimony is scheduled to resume on Wednesday.