PROVO — A Utah County gynecologist admitted guilt Friday to 18 felony counts of prescription fraud.

After Dr. Robert Richards entered his plea, a 4th District Court Judge ruled that Dr. Robert Richards must remain sober for two years in order to avoid prison.

In addition, Richards must refrain from taking illegal or unauthorized substances for five years if he is to keep his license to practice medicine in the state of Utah.

Richards agreed to plead guilty as part of a plea deal with prosecutors.

The doctor was charged after a police investigation in February indicated that Richards allegedly wrote prescriptions for narcotic pain killers in the names of his family members and then redeemed them for his personal use.

Deputy Utah County Attorney Guy Probert said the prescriptions were written for six of Richards' family members. He wrote the prescriptions from February 1998 to March 1999.

Richards' attorney, Harold Reiser, said the Utah Department of Professional Licensing has agreed to let his client keep his license to practice medicine if Richards goes through the Utah Recovery Assistance Program for five years successfully.

The program is overseen by the Utah Physicians Licensing Board.

Reiser said Richards has been undergoing substance-abuse treatment and has been drug-free for five months.

In court, Judge Fred Howard expressed concern that the plea agreement did not fully protect the public's safety and adequately serve justice.

Reiser said the licensing agency will closely supervise Richards and that any violation will result in the revocation of his license.

Probert added that because the state licensing agreement is tied to his plea bargain, any licensing violation will also be considered a violation of his criminal agreement.

Howard agreed to the terms of the plea deal. He said Richards' license would not be revoked and he will avoid time in jail if he stays sober during his probation period.

Richards has been a licensed physician since 1978, according to state records.

Reiser said Richards continues to practice medicine in Utah County.

Because the doctor recently surrendered his license to issue narcotic prescriptions, Reiser said, other doctors will write prescriptions for his patients.