LOS ANGELES -- Actor Robert Downey Jr., who faced a potentially career-ending long prison term for a November Palm Springs drug arrest, will plead no contest to two drug charges and enter rehabilitation for up to a year in a deal with prosecutors, his new lawyers said on Wednesday.

Under the tentative agreement with Riverside County prosecutors, reached in the last few days after Downey hired a new set of lawyers, the 36-year-old actor would avoid returning to prison, attorney Michael Adelson said.

He said Downey is expected to formally enter his no contest plea to one felony count of cocaine possession and a misdemeanor drug charge at a court hearing on July 16.

View more

Adelson said he and fellow attorneys James Epstein and Ross Nabatoff reached the tentative deal with prosecutors during the past several days, after taking over the case from Downey's original legal team.

Adelson would not say why Downey changed legal representation or whether the switch led to the deal. Downey's publicist declined to comment.

One of Downey's former lawyers, Daniel Brookman, released a brief statement saying, "Our objective was to get Mr. Downey in rehabilitation rather than jail. After six months of legal endeavors, we achieved our goal in obtaining a plan calling for rehabilitation rather than incarceration."

Brookman added that Downey had chosen to bring in new lawyers to handle "any future legal and rehabilitation matters."

Brookman did not elaborate on the reported plea agreement or on Downey's decision to change lawyers.

Riverside County Deputy District Attorney Tammy Capone, who is prosecuting the case, was not immediately available for comment on the deal.

Downey checked himself into a drug rehab center in April, shortly after another drug arrest in suburban Culver City. Prosecutors declined to file charges in that case despite tests showing he had cocaine in his system.

In the Palm Springs case, police responding to an anonymous telephone tip said they found cocaine and the prescription drug Valium in his hotel room. Downey initially was charged with felony possession of both drugs and a misdemeanor count of being under the influence of a controlled substance.

A conviction on all three counts could have landed him back in prison for up to four years and eight months. But felony charge of possessing Valium was reduced last week to a misdemeanor.

Downey's arrest Nov. 25 came three months after he was freed from a one-year prison stay in California on a prior drug conviction and has threatened to derail what started out as a remarkably swift career comeback.

Within a week of his release from prison, Downey had landed a recurring guest role on the popular Fox television show "Ally McBeal," playing the latest love interest of series star Calista Flockhart. That role earned him Golden Globe and Screen Actors Guild awards. He also

But the Palm Springs arrest cost him a role in a high-profile film, "America's Sweethearts," starring Julia

His subsequent arrest in Culver City left the producers of "Ally McBeal" scrambling to finish the season without him. The season finale last Monday left open the possibility of Downey's character returning at a later date.