An actress who accused Los Angeles police of racially profiling her after she was accused of having sex with her boyfriend in a parked car last year was ordered Monday to apologize to officers.

Daniele Watts, best known for her appearance in the 2012 film "Django Unchained," pleaded no contest to disturbing the peace with loudness and was ordered to write an apology to three police officers and the occupants of a building near where she was briefly detained this past September in Studio City, Calif.

As part of their plea deal, Watts and her boyfriend, Brian Lucas, were also ordered to perform 40 hours each of community service, according to the Los Angeles City Attorney's Office. The case will be dismissed and not appear in public records if the pair remain out of trouble for one year.

Watts and Lucas were also charged with lewd conduct, but that count was dismissed Monday. 

Police officers were investigating a report of two people having sex in a car on Sept. 11 when they questioned Watts and Lucas. Watts claimed they were just kissing and accused the officers of racial bias. The pair were eventually released. 

The LAPD began an internal investigation into the actions of the responding officers, one of whom later released an audiotape of his conversation with Watts.

The release of that tape called into question Watts' allegations of racial profiling and mistreatment by the officers. Some local civil rights activists who had spoken out in support of Watts later backed off and called on the actress to apologize to police.

Lou Shapiro, an attorney for the couple, told the Associated Press the actress will apologize for her comments to police and is not admitting she and Lucas engaged in lewd conduct.

He said Watts "wishes she hadn't said some of the things she said" to police during the incident.

The Associated Press contributed to this report.

Click for more from MyFoxLA.com.