Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Seven months after she said she'd never apologize for suggesting Los Angeles cops racially profiled her, "Django Unchained" actress Daniele Watts agreed Monday to apologize to the three officers who detained her and her boyfriend last year, authorities told NBC News.

Watts, who is black, and Brian Lucas, who is white, pleaded no contest Monday to disturbing the peace with loudness in the September 2014 incident, in which police said they responded to a "citizen complaint of indecent exposure" after someone called 911 to complain that two people were engaged in sexual acts in a car parked near the CBS studio lot. The three officers briefly detained Watts and Lucas before releasing them that day.

A spokesman for the Los Angeles city attorney's office told NBC News that Watts and Lucas were each sentenced to a year of "formal diversion," which usually entails counseling, and 40 hours of community service. In addition, they agreed to write letters of apology to the three police officers, who said they cuffed Watts after she grew agitated and refused to provide her ID during the call last year. And they also agreed to write letters of apology to the residents of the building outside which their car was parked.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

Watts denounced the officers in a long Facebook post the day she was cuffed, saying, "The tears I cry for a country that calls itself 'the land of the free and the home of the brave' and yet detains people for claiming that very right."

But after a police audio recording of the confrontation was made public, civil rights activists cast doubt on Watts' account and called on her to apologize.

Lou Shapiro, an attorney for Watts and Lucas, told the Los Angeles Times that his clients were pleased and were looking forward to having the case removed from their records.

"It was a very emotionally charged case," Shapiro told the newspaper. "I think it's a nice ending to an emotionally charged case, to have a letter of apology. It's a win for everybody."

Actress Daniele Watts was handcuffed and briefly detained in Studio City, California, in September 2014. Brian James Lucas

IN-DEPTH

Andrew Blankstein of NBC News contributed to this report.