“There are inadequate investigations, failures to prosecute, and in general they have undermined the safety of women in Missoula,” said Jocelyn Samuels, the acting assistant attorney general of the Justice Department’s Civil Rights Division. She said federal authorities had sought to resolve their concerns but had been rebuffed, and were willing to take legal action against the county attorney’s office.

Two related federal investigations into Missoula’s Police Department and the University of Montana concluded last year with agreements between local officials and the Justice Department. Included were promises to improve the way the local authorities handled reports of sexual assaults and the hiring of independent overseers to monitor their efforts.

But Mr. Van Valkenburg has rejected any such settlement. He has refused to hand over his case files to federal investigators, citing confidentiality concerns, and said the federal authorities were wrong to issue the excoriating 20-page list of findings against his office in February.

The confrontation has again brought Montana under harsh scrutiny over how its legal system treats women who are sexually assaulted. Seven months ago, in an unrelated case in eastern Montana, Judge G. Todd Baugh was widely condemned for saying a 14-year-old girl had been partly to blame in a statutory rape case involving one of her high school teachers, Stacey Dean Rambold.

In Missoula, some officials worry that Mr. Van Valkenburg is inviting an unproductive and expensive legal fight. Missoula’s mayor and its new police chief published an op-ed newspaper article in The Missoulian that had the effect of distancing their responses from the prosecutor’s office. They said the agreement that the city had reached with the Justice Department was working and that it had helped forge new policies ensuring that the police communicated “more frequently and thoughtfully” with sexual-assault victims.

Two Democrats hoping to succeed Mr. Van Valkenburg as county attorney — he is not running for re-election — say it is time to rebuild trust with the community and move forward. Josh Van de Wetering, one of the candidates, said a legal confrontation would be expensive and time-consuming, while the “very real problem of appropriately addressing sexual assault in our community seems to have taken a back seat.”