Updated

Film director Lee Tamahori pleaded no contest to criminal trespass in return for two prostitution charges against him being dropped, authorities said Thursday.

The plea deal stemmed from Tamahori's Jan. 8 arrest for allegedly soliciting an undercover police officer in Hollywood and offering to perform a sex act for money.

The two dropped charges, said city attorney spokesman Frank Mateljan, were misdemeanor counts of solicitation and loitering with the intent to commit prostitution.

Tamahori, who was not present at the hearing in Superior Court, was placed on three years probation, ordered to attend an AIDS education course and perform 15 days of community service for the Hollywood Beautification Project, Mateljan said.

He will not be able to loiter, congregate in alleys or accept rides with the intent to engage in prostitution, the spokesman said.

At the time of his arrest, the 55-year-old director wore an off-the-shoulder dress and black wig, and allegedly approached the officer and got into his car, Mateljan said.

"We're pleased with the outcome, he's pleased with the outcome, and he's back at work" directing, Tamahori's attorney, Mark Geragos, said.

The New Zealand native's directing credits include Pierce Brosnan's 2002 James Bond film Die Another Day, last year's xXx: State of the Union and 1994's Once Were Warriors.

Tamahori is set to direct Jessica Biel, Nicolas Cage and Julianne Moore in Next, a sci-fi thriller based on Philip Dick's The Golden Man,Variety reported Thursday.