CHEYENNE, Wyo. — A Wyoming psychologist pleaded guilty Friday to health care fraud in a plea agreement with federal prosecutors that calls for him to serve three years in prison and reimburse the state and federal government nearly $2.3 million.

Gibson Condie, 57, of Powell entered his plea before U.S. District Judge Alan Johnson, who ordered a presentence investigation and set sentencing for Jan. 8.

Condie remains free until his sentencing after Johnson determined he was not a flight risk or a danger to the public.

Condie had been accused of submitting about $6.8 million in fraudulent bills to Wyoming Medicaid. He was originally indicted last May on 234 counts of fraud by a federal grand jury.

Condie, who responded to the judge with short and courteous answers, and his attorney, Steve Kline, declined comment after the hearing.

Asked about the disparity between the indictment and the plea agreement, Assistant U.S. Attorney Eric Heimann said that all 234 counts stemmed from the same scheme Condie used to defraud Medicaid between June 2012 and February 2016.

Under federal sentencing guidelines, there would not have been much difference in punishment if Condie had pleaded guilty to additional counts, Heimann said.

“He’s going to prison for three years; he didn’t get away with anything,” Heimann said.

Prosecutors said the scheme generally involved Condie billing Wyoming Medicaid for unnecessary services that were done by others around the state while he spent little time himself on the cases. Condie would keep up to 50 percent of the money Wyoming Medicaid paid.

Condie did not know whether the services for which he was billing Wyoming Medicaid “were being provided, were therapeutically necessary, or were alleviating any mental health disorder suffered by the beneficiary,” prosecutors said.