HAGERSTOWN, Md. — A 15-year-old Maryland girl who was handcuffed, pepper-sprayed and charged with assaulting police officers after her bicycle hit a car won’t face court proceedings, community service or supervision by juvenile authorities under an agreement her lawyer announced Tuesday.

Attorney Robin Ficker said the girl has written a letter to the state Department of Juvenile Services apologizing for cursing at officers who struggled to detain her after she refused to identify herself or her parents.

The girl had been charged by police as a juvenile with two counts of second-degree assault, plus disorderly conduct, marijuana possession and a traffic violation.

The Sept. 18 incident, captured by police body cameras and cellphone video, prompted three days of demonstrations by people demanding police accountability in Hagerstown, a city of 40,000 about 70 miles west of Baltimore.

The Department of Juvenile Services could not confirm the agreement due to confidentiality laws regarding juvenile records, spokeswoman Audra Harrison said.

Police and city officials didn’t immediately respond to phone calls and emails from The Associated Press. Police Chief Victor Brito has said his officers initially tried to de-escalate the situation, and then used appropriate force to get the kicking, cursing girl inside a cruiser and off to the police station so they could properly investigate the accident.

The girl refused medical care from paramedics at the accident scene. Her father later took her to an emergency room, where she was diagnosed with a possible concussion, according to a medical report.

Ficker wouldn’t rule out a civil lawsuit against the city or police. He said the girl’s parents have not taken any steps toward civil action, “but who knows what the future will hold.”

In her letter, which Ficker provded to the AP, the girl apologized for her language and said she wasn’t thinking clearly, having been briefly knocked unconscious in the collision.

“I was not brought up to speak that way. I have been taught to be respectful of everyone. I feel that if this accident had never happened I would have not spoken that way,” she wrote.

A bystander’s cellphone video shows officers forcefully flinging the struggling girl toward a building before handcuffing her. She and Ficker say she was slammed against the wall, but the camera angle misses the moment of impact. The video shows her a moment later, pressed face-first against the wall.

Ficker said the girl, a high-school sophomore, had no prior involvement with juvenile authorities.

“She is just to keep going to school as she’s doing and not to get in any trouble,” he said.

The dark-skinned girl has a white mother and black father, and all the officers involved are white, but race has not been raised as an issue in the case.