Matthew Fox attends IWC Flagship Boutique New York City Grand Opening on April 25, 2012 in New York City. Credit: Fernando Leon/Getty

No jail for Matthew Fox -- if he completes a treatment program.

The Lost star was arrested on May 4 for drunk driving and struck a plea deal with prosecutors to avoid jail time.

According to TMZ, the 45-year-old actor pled no contest to one count of DUI. In the plea deal, Fox is required to complete a drug and alcohol treatment program. He also isn't allowed to drink for a year.

If the diversion program is completed, the case will be dismissed.

Fox was arrested in Bend, Oregon -- where he lives with wife of 10 years Margherita Ronchi and their two children, daughter Kyle and son Byron -- while driving early in the morning to a fast food restaurant.

Last week, Fox's other legal problem was dropped. Bus driver Heather Bormann dismissed her lawsuit against the actor that alleged he assaulted her. On Aug. 28, 2011, Fox was accused of punching Bormann in the chest and pelvic area after he attempted to board a private party bus in Cleveland, Ohio.