By the time golf legend Tiger Woods stepped into a Palm Beach Gardens courtroom Friday, he had already completed most of a first-time DUI offender diversion program to keep himself out of jail for his May arrest after Jupiter police found him asleep in his damaged Mercedes while on powerful painkillers.

Woods, 41, who lives on Jupiter Island, pleaded guilty to a charge of reckless driving Friday in a brief hearing that came months after prosecutors and his attorney announced that he would enter the program so prosecutors would drop the more serious DUI charge against him.

» PHOTOS: Tiger Woods court hearing for DUI

(READ MORE BELOW)

Golfer Tiger Woods talks with defense attorney Douglas Duncan Palm Beach County court Friday, October 27, 2017, as he pleaded guilty to a charge of reckless driving in connection with his May arrest for DUI. (Lannis Waters / The Palm Beach Post/ POOL)

Lannis Waters/The Palm Beach Post

Palm Beach County Judge Sandra Bosso-Pardo withheld a finding of guilt on the reckless driving charge, which means the golf great could later have the charge expunged from his record. She also agreed to dismiss a charge of improper parking, a traffic infraction, filed against him.

» Read: Full coverage of Tiger Woods’ DUI arrest

Woods arrived in a black Chevy Tahoe a half-hour early and only spoke briefly in court to enter his plea and tell Bosso-Pardo that he wasn’t under the influence of any drugs. Aside from his attorney, Douglas Duncan, Woods’ rumored girlfriend, Erica Herman, and at least two other men accompanied Woods. Woods left the courthouse afterward without speaking to reporters.

“Mr. Woods was treated like every other defendant, except for the media coverage,” Palm Beach County State Attorney Dave Aronberg said at a news conference outside the courthouse after deputies ushered Woods and his entourage away.

» Who is Tiger Woods’ rumored girlfriend?

As part of the DUI diversion requirements, Woods agreed to participate in various programs and abstain from illicit drugs and alcohol during a 12-month probationary period. Bosso-Pardo warned him if he fails to meet any of the requirements, the charges could be reinstated and she could send him to jail for 90 days.

Duncan and prosecutors told the judge that Woods already has completed a substance abuse program at an undisclosed location and did the required 50 hours of community service through his Tiger Woods Foundation, which provides education opportunities for youth worldwide. He also wrote a $250 check to Palm Beach County Victim’s Service.

(READ MORE BELOW)

Tiger Woods leaves the North County Courthouse in Palm Beach Gardens, Florida on October 27, 2017. Tiger Woods is expected to plead guilty "in abstentia" to a charge of reckless driving in connection with his May arrest for DUI. A long-awaited plea deal, that would allow Woods to enter a DUI diversion program, is expected to be approved by Palm Beach County Judge Sandra Bosso-Pardo at a hearing at the North County Courthouse in Palm Beach Gardens. (Richard Graulich / The Palm Beach Post)

Richard Graulich

As part of the diversion program, Woods also has attended DUI school and met with people who have lost loved ones to drunk driving.

The only part of the diversion program left for Woods to complete is the 12-month probation term, and on Friday the judge told Woods he was allowed to report to probation by mail. But he also will have to submit to random drug tests over the year and has to be available to speak whenever his probation officer calls.

Because no alcohol was found in his system when he was arrested at 3 a.m. on May 29 on Military Trail south of Indian Creek Parkway, Woods can skip the requirement to have his car outfitted with a device that would detect if he has been drinking before he can start his ignition. However, as part of the program, his car will be immobilized for 10 days, Bosso-Pardo said. He is free to travel anywhere, she said, but has to let his probation officer know about his out-of-country travel.

Woods attributed his dazed and confused condition to prescription medicine he was taking after his fourth back surgery in April. With his speech slurred and his stance unsteady, arrest video showed Woods unable to follow a Jupiter police officer’s instructions.

Aronberg said Woods can continue to take drugs prescribed by a doctor during his year-long probation.

In posts on his Twitter account weeks after his arrest, Woods said he was “currently receiving professional help to manage my medications and the ways that I deal with back pain and a sleep disorder.”

Weeks later, on July 3, he tweeted: “I recently completed an out of state private intensive program. I will continue to tackle this going forward with my doctors, family and friends.”

» PHOTOS: Tiger Woods in South Florida

Toxicology reports, obtained by ESPN, showed he had narcotic painkillers Vicodin and Dilaudid, along with the anti-anxiety drug, Xanax, and the sleeping aid, Ambien, in his system at the time of his arrest. It also showed his blood contained THC, typically linked to marijuana use.

Over the years, Woods has held charity golf tournaments that have raised millions to create educational opportunities for youth throughout the world. This month, for instance, he hosted an exclusive three-day golf tournament in Pebble Beach, Calif., to raise money for his foundation.

Golfer Tiger woods enters Palm Beach County court Friday, October 27, 2017, where he pleaded guilty to a charge of reckless driving in connection with his May arrest for DUI. (Lannis Waters / The Palm Beach Post/ POOL)

Lannis Waters/The Palm Beach Post

Since his arrest, the golfing world has rallied around Woods, who snared unfavorable headlines in 2009 when he got in a single-car wreck in Windermere, a luxury town between Orlando and Walt Disney World.

He was hospitalized with a sore neck and cut lip and was cited for careless driving after he drove over a fire hydrant and into a tree. But the real injury was to his reputation when a string of women emerged, claiming they had affairs with the married golfer. He underwent treatment for sex addiction and divorced Elin Nordegren, the mother of his two children, after nearly seven years of marriage.

The crash also derailed his legendary golf career. With 14 major PGA titles, second only to icon Jack Nicklaus, Woods hasn’t won a major since 2008. His last tournament win came in 2013.

Still, his recent Twitter posts indicate he is planning a comeback thanks to what he called successful back fusion surgery in April to end years-long debilitating spasms and leg pain.

Last week, he posted a video of himself practicing, labeling the long, low drive “the return of the stinger.” His agent recently told ESPN surgeons had cleared Woods to return to the links.

His plea hearing originally was set for Wednesday, but he was photographed that day watching his beloved Dodgers get handed a defeat by the Houston Astros in Game 2 of the World Series in Los Angeles. Court officials announced the postponement of that hearing on Tuesday.

Fellow golfing greats said they are hoping Woods can put his arrest behind him.

“Tiger’s a friend,” said Nicklaus, who lives in Palm Beach Gardens, shortly after Woods’ arrest. “He’s been great for the game of golf. He needs our help. I wish him well.”

Palm Beach County State Attorney Dave Aronberg now addressing the media. pic.twitter.com/dtFoplZXhg

— PB Post Courts (@pbpcourts) October 27, 2017

#TigerWoods arrived in a black Chevy SUV just a few minutes ago. He was wearing a charcoal-colored jacket and pants to his DUI hearing. pic.twitter.com/bnbFec8ER0

� PB Post Courts (@pbpcourts) October 27, 2017