BANGOR, Maine — Former Washington County Sheriff Donnie Smith was doing what other sheriffs around the state were doing when he was accused of misappropriating money from the jail’s inmate benefit fund, Smith’s attorney told a judge Thursday.

Don Brown of Brewer sketched out Smith’s defense strategy to Superior Court Justice William Anderson at a hearing on motions held at the Penobscot Judicial Center. The case was moved last year to Bangor after concerns arose about whether an impartial jury could be seated in Machias.

Smith, who lost a re-election bid in 2014 to current Sheriff Barry Curtis, did not attend Thursday’s hearing.

Anderson ruled on the motions Friday and set Smith’s jury trial for June 27 in Bangor over Brown’s objections.

The attorney said Thursday that he could not be ready for trial by the end of the month.

Heather Staples, assistant district attorney for Hancock and Washington counties, who is prosecuting Smith, on Thursday referred questions about the case to District Attorney Matt Foster.

Foster said Friday that his office was ready to proceed to trial on June 27.

The prosecutor compared Smith’s defense strategy to things he’s heard in traffic court.

“People try to give that defense all the time,” he said. “They say, ‘I was just in the flow of traffic.’ Well, it’s still speeding.”

Efforts to reach Brown on Friday were unsuccessful.

Smith was indicted May 4, 2015, by the Washington County grand jury on one count each of theft by unauthorized taking, theft by misapplication, both Class B crimes, and misuse of entrusted property, a Class D crime. He has pleaded not guilty to the charges.

Smith is accused of taking $11,700 from the inmate benefit account between January 2007, just after he first took office, and December 2012. He allegedly spent the money on gifts for deputies, charitable donations, meals, flowers, uniforms and other items that did not directly benefit inmates.

Money that goes into the account is from jail commissary sales and fees from telephone service for inmates, according to previously published reports. Funds from the account are to be spent to directly benefit inmates, according to Maine Department of Corrections’ rules.

On Friday, the judge denied a motion Foster filed that sought to remove Brown as Smith’s attorney because of a possible conflict of interest because Brown represented Smith in prior litigation and was paid by Washington County.

“Attorney Brown represents that he gave no advice to Sheriff Smith concerning expenditures from the account and that his representation of Sheriff Smith on these matters began after the expenditures were made that are the subject of the trial,” Anderson wrote in his order. “Because attorney Brown did not represent the county, and because there is no possibility that he could become a witness at trial, the motion is denied.”

The judge also granted a defense motion for discovery that ordered the prosecutor to “provide all reports and updates of reports prepared by any expert witnesses that contain information relevant to the charge[s], including any investigative reports related to the spending of inmate benefit account funds from other counties.”

Brown said Thursday that he intended to subpoena information about how other counties have spent money from their inmate benefits funds. Anderson said in the order that counties must comply with those subpoenas in seven days.

The judge has not yet decided whether an unrelated case will be combined with the theft case into one trial. Smith faces misdemeanor charges of reckless conduct and driving to endanger in connection with a Jan. 6, 2015, incident in Lubec with a woman he had previously accused of assaulting him.

If convicted of the theft crimes, the most serious charges, Smith faces up to 10 years in prison and a fine of up to $20,000. He also could be ordered to pay restitution.