07/16/2001 at 01:00 AM EDT
Robert Downey Jr. pleaded no contest on Monday to cocaine-related charges in a plea bargain that will allow him to continue live-in drug treatment, as opposed to serving jail time. In addition, the troubled actor, who last week was Emmy-nominated for his supporting role on TV's "Ally McBeal," will face a series of fines and a court-ordered set of regulations, including random drug testing. Asked if he understood the terms by which he was sentenced on Monday, Downey, 36, told Superior Court Judge Randall White in an Indio, Calif., courtroom: "I'm well aware, your honor." The jurist warned Downey that he could go to prison for up to four years if he violated the terms of the deal. Downey was arrested last Thanksgiving in a Palm Springs hotel suite after someone placed an anonymous 911 call to police. His plea bargain deal was struck under Proposition 36, which California voters approved last year. It removes the threat of prison for drug offenders unless they are charged three more times with drug violations or repeatedly fail to cooperate in treatment programs. "This is not a gift of the court," Judge White told Downey. "This is going to be hard work."