BEND (AP) — A Portland defense attorney and former Washington County district attorney walked out on his client and resigned in protest during a hearing, a newspaper reported Thursday.

Attorney Scott Upham, 72, was representing Dylan Todd Sullivan on Wednesday in a Deschutes County courtroom.

Sullivan, a basketball coach and former substitute teacher, has pleaded not guilty to felony charges of luring a minor, online sexual corruption of a child, sex abuse and other charges. Prosecutors allege he engaged in sexual misconduct with female La Pine High School students in 2013 and 2014.

Upham had subpoenaed six local officials, including the Deschutes County district attorney, to testify in the case and prosecutors filed motions to quash those subpoenas.

During the hearing, Upham argued that Judge Randy Miller was unqualified to hear the case. He then grew agitated, said he would resign and left the courthouse — leaving Sullivan behind.

The Bulletin reports that Upham's court filings in the case allege a conspiracy by Oregon law enforcement officials to fabricate and withhold evidence. Miller could file a complaint against Upham, resulting in a disciplinary hearing.

A local hearing may also be held to determine if Upham would be found in contempt of court, either civilly or criminally.

The Oregon Rules of Professional Conduct require defense attorneys to provide their clients competent representation with the "legal knowledge, skill, thoroughness and preparedness reasonably necessary." And when lawyers have concerns for a fellow attorney's competency, they have an obligation under the rules to formally or informally report it.

Upham served as elected district attorney for Washington County for 20 years before going into private practice.

He did not return a call seeking comment Thursday.

-- The Associated Press