LOS ANGELES (AP) Sacramento Kings forward Zach Randolph was sentenced to community service on Wednesday after being charged with marijuana possession and resisting arrest following an incident last month at a Los Angeles housing project, prosecutors said.

Randolph entered a no-contest plea during a court appearance Wednesday and was immediately sentenced to 150 hours of community service, said Frank Mateljan, a spokesman for the Los Angeles city attorney's office.

The two-time All-Star may petition the court for the charges to be vacated if he stays out of trouble for a year, Mateljan said.

Randolph initially had been arrested in August on suspicion of possessing marijuana with intent to sell, a felony, but Los Angeles city prosecutors instead charged him with misdemeanor drug possession. Court documents said the 36-year-old Randolph possessed "more than 28.5 grams of marijuana or more than four grams of concentrated cannabis or both." Randolph also was accused of resisting arrest and obstructing a Los Angeles police officer in the discharge of his or her duties.

Randolph was arrested Aug. 9 at the Nickerson Gardens housing project in Watts after officers observed a crowd of people drinking, smoking marijuana, blasting music and blocking streets, police have said. The officers observed three people, including Randolph, run off but immediately stopped one of the men, police said. Randolph and another man ran inside a home and were arrested after a crowd of bystanders formed and attempted to block the officers, police said.

After the arrests, the crowd grew and people began throwing bottles and rocks, police said. Five police cars and one sheriff's vehicle ended up with smashed windows and slashed tires, but no officers were injured.

Randolph's attorney did not immediately respond to a message seeking comment on Wednesday, but he has previously said the charges against his client were "false and misleading."

Randolph, a 16-year NBA veteran, spent eight seasons with the Memphis Grizzlies before signing with the Kings in July.

Randolph played for Michigan State and was drafted in 2001 by the Portland Trail Blazers. Randolph also played for the New York Knicks and Los Angeles Clippers.