A contentious legal battle over a report allegedly showing that Eliot police officers consistently falsified their patrol reports ended abruptly Friday when a judge ruled that no such report exists.

Justice John O’Neil Jr.’s four-page order upheld the argument made a week earlier by Eliot Police Chief Theodor Short during a hearing that featured dueling testimony from the chief and his former second-in-command, Kevin Cady.

During that proceeding at York County Superior Court in Alfred, Cady testified that he presented a 60-plus-page report to the chief documenting his discovery that four of the department’s six patrol officers had repeatedly lied in their reports, claiming they had patrolled areas in town while GPS mapping data from their cruisers proved they hadn’t.

Cady said Short’s response was only to tell him he had “opened a can of worms.”

Cady also said he could not do anything further with the information because the chief failed to launch an internal affairs investigation, as required by police protocols.

O’Neil, in his ruling, said Cady’s report was incomplete, consisting of data and notes without any conclusion.

“Mr. Cady may have assumed that Chief Short did not wish for him to continue on from his preliminary findings. However, Chief Short did not order that this investigation cease,” O’Neil wrote in his ruling. “The court concludes that there never was a final investigative report of this conduct.”

Cady’s accusations against Short and Eliot police patrol officers came up during his testimony in an unrelated domestic violence case that the Eliot Police Department investigated in 2012. In the criminal case, Paul Olsen, 33, is accused of assaulting and raping his former girlfriend at her Eliot home.

Attorney Amy Fairfield, who represents Olsen, has demanded that Short turn over Cady’s report to be used as evidence in Olsen’s defense, believing it could undermine the credibility of the officers who charged her client.

O’Neil denied Fairfield’s request for sanctions against the York County District Attorney’s Office for not turning over Cady’s findings.

Assistant District Attorney Thomas Miscio, who is prosecuting the case against Olsen, had unsuccessfully sought to close to the public the court hearings in which Cady, Short and others testified. He had argued that the unsubstantiated allegations could irreparably harm officers’ professional reputations. O’Neil allowed the hearings to be conducted openly, on condition that the names of accused officers not be used in court.

“I think the court order is pretty clear that the report does not exist and therefore cannot be introduced in trial,” Miscio said Friday. “I think the Eliot Police Department was vindicated in this order.”

Miscio said Friday’s ruling clears the way for the case against Olsen to proceed to an as-yet unscheduled status hearing or trial. Olsen has been jailed since his arrest on Sept. 19, 2012.

An attorney for the town of Eliot, Asha Echeverria, said the judge’s ruling showed that Short acted appropriately and that neither Short nor the town tried to mislead or hide information.

“What we had here was an example of a defense attorney, in a domestic assault case in which a man is accused of raping and assaulting a woman, trying to discredit police officers. Chief Short and the Town of Eliot place a premium on the integrity of the police department and do not tolerate dishonesty or misconduct on any level,” Echeverria said in an email.

Fairfield said Friday that she had hoped the judge would rule in her client’s favor, since testimony made it clear that only Short could have authorized an internal investigation.

“Essentially, lawyers fight and the judge decides. And I respect the court’s order,” Fairfield said. “I think a ruling for the defense in this case would have seriously compromised the integrity of every single investigation under Chief Short’s tenure.”

Short, who is chief of both the Eliot and Kittery police departments and has worked in law enforcement for 40 years, told the Portland Press Herald last month that he remembers discussing with Cady the possibility that officers lied in their patrol reports, but that he had never been given a report.

Cady testified that he looked into GPS data and officers’ patrol reports in 2009 after a patrolman’s ex-girlfriend accused the officer of domestic violence stalking while on duty.

Though Cady did not name that officer in court, news reports from the time describe former Eliot police Officer Matthew Raymond’s arrest on a stalking charge. Raymond ultimately pleaded guilty to a lesser charge of harassment, according to a 2010 news story.

Cady testified that to verify the accuracy of the GPS evidence in the stalking case, he checked data from other officers’ cruisers and found that it didn’t match what they had documented in their reports. He said the department had required officers to conduct checks at the homes of people who were out of town and record each time they conducted those checks.