It has raised questions about how the Border Patrol treats female agents and how it responds to allegations of sexual assault. Although Mr. Zamora was arrested and then indicted in July on sexual assault and kidnapping charges, the Border Patrol has yet to take any official action in the case.

Border Patrol officials allowed Mr. Zamora to retire after his arrest and indictment. And the top Border Patrol agent in the Tucson sector — Roy Villareal, who was the new chief patrol agent in the region and the female agent’s supervising officer — was with Mr. Zamora and the female agent earlier on the night of the reported assault, according to police report s, but told the authorities he saw nothing inappropriate in their interactions.

The female agent, identified in court documents by her initials of R.W., had planned to meet with Mr. Zamora that evening in May for dinner. R.W. told the police that she had considered Mr. Zamora a kind of mentor. He was more than 10 years older than her , had more seniority with the agency and had climbed the ranks to become an assistant chief in the nearby Yuma sector. But shortly before they met at a restaurant in Tucson, she said, he had sent her a provocative text message.

He asked her, she told the authorities, if she had “dressed up” for him. It was one in a series of flirtations and advances he had made to her over a period of years that she said she had rebuffed or ignored. But on this night after dinner in Tucson, he went too far, she claimed in court documents. R.W. said Mr. Zamora bought round after round of tequila shots, took her back to his hotel room and sexually assaulted her.

R.W. reported being assaulted to the police on May 25, two days after the encounter. Six weeks later, in July, Mr. Zamora was indicted by a Pima County grand jury in Tucson on three counts of felony sexual assault and one felony count of kidnapping. He retired from the Border Patrol on July 31, 21 days after his arrest. A pretrial hearing in the case is scheduled Monday in Arizona Superior Court in Tucson.