Tiger Woods has agreed to plead guilty to reckless driving and will enter a diversion program that will allow him to have his record wiped clean if he completes the program, a prosecutor said Wednesday.

Woods, 41, was charged with driving under the influence in May when he was found asleep in his Mercedes-Benz, apparently under the influence of a prescription painkiller and sleeping medication. No alcohol was found in his system.

Woods did not appear at the Palm Beach County courthouse for his arraignment. Prosecutor Adrienne Ellis said the golf superstar agreed to plead guilty at an 25 October hearing and enter the county’s program for first-time DUI offenders.

“He is not being treated any different than anyone else,” Ellis said.

Woods’ attorney, Douglas Duncan, entered a not guilty plea to the DUI charge on Woods’ behalf and declined comment as he left the courthouse.

Under the plea deal, prosecutors would drop the DUI charge, which is a more severe charge than reckless driving. If he completes the program, he can ask a judge to expunge the reckless driving conviction.

In the diversion program, Woods will spend a year on probation, pay a $250 fine and court costs, attend DUI school and perform 50 hours of community service. He would also have to attend a workshop where victims of impaired drivers detail how their lives were damaged and face other conditions. Since the program began four years ago, almost 2,400 defendants have enrolled, according to the Palm Beach County State Attorney’s Office.

If convicted of DUI, Woods would have faced a fine of between $500 and $1,000, had his car impounded for 10 days and other conditions. He also could have been jailed for up to six months, although that was unlikely, received probation and lost his driver’s license for six months to a year.

The DUI arrest was the first time Woods had been in trouble since Thanksgiving weekend 2009, when he plowed his SUV into a tree and a fire hydrant outside his then-Windermere, Florida, home. That led to revelations that he had multiple extramarital affairs and a divorce from his wife Elin Nordegren, the mother of his two children. He spent 45 days in a Mississippi clinic where he was treated for sex addiction.

Woods was arrested at 2am on 29 May about 15 miles from his home in Jupiter, Florida, when officers found him unconscious in his Mercedes-Benz, which was parked awkwardly on the side of the road and had damage to the driver’s side. It’s not clear how he damaged the car. Officers checked the area but didn’t find that he had hit anything.

Woods didn’t know where he was when asked by officers, and he stumbled and swayed through a field sobriety test, police dashboard camera video showed. Woods told officers he was taking the painkiller Vicodin and Xanax, which treats anxiety and insomnia, to cope with his fourth back surgery in April.

Woods announced last month he had completed treatment at an out-of-state clinic to deal with his use of prescription medications.

His 79 PGA Tour victories and 14 major titles both rank No2 all-time. He has not competed since February because of his back injury and is not expected to return this year. His last win was in August 2013.