The city of Philadelphia will pay $2 million to a 29-year-old mother who was pulled from her SUV during civil unrest last October and beaten by police then separated from her toddler — a scene captured on video and shared widely on social media.

The city said Monday that it had reached the agreement after negotiations with lawyers for Rickia Young, a North Philadelphia home health-care aide who the video showed tried to drive through mayhem and then was swarmed by officers who bashed in her windows. She did not file a lawsuit.

A police officer and a sergeant were fired in May as a result of their conduct during the incident, and an additional 15 officers are awaiting disciplinary proceedings, department officials said Monday.

Police Commissioner Danielle Outlaw said in a statement that “instead of fighting crime and the fear of crime, some of the officers on the scene created an environment that terrorized Rickia Young, her family, and other members of the public.”

Mayor Jim Kenney called the officers’ actions “absolutely appalling.”

“This terrible incident, which should have never happened to anyone, only further strained the relationship between the Police Department and our communities,” Kenney said in a statement.

Young’s attorneys called on District Attorney Larry Krasner to file criminal charges against the officers involved. Krasner said Monday he couldn’t confirm a criminal investigation. He said that, in general, investigating police behavior during chaotic incidents “presents a challenge in terms of locating body-worn cameras for the individuals involved.”

“When you have a situation that is somewhat fluid on the street,” he said, “it is more difficult to reconstruct exactly what officer was where, when.”

A Police Department spokesperson said Sgt. David Chisholm, a 13-year veteran who worked in the 26th Police District, was fired for violating departmental policies, including inappropriate communications or conduct while on duty, use of force, and lying or attempting to deceive during a departmental investigation.

Police Officer Darren Kardos, a seven-year veteran who worked in the 19th Police District, was fired for excessive use of force and physical abuse with a baton.

A spokesperson for the Fraternal Order of Police Lodge 5, the union that represents Philadelphia police officers, did not respond to a request for comment.

The incident happened just before 2 a.m. on Oct. 27, hours after two police officers fatally shot Walter Wallace Jr., a 27-year-old Black man who relatives said was experiencing a mental health crisis that afternoon and lunged toward police while wielding a knife.

Protests erupted within hours, and some in West Philadelphia began burglarizing stores and vandalizing police vehicles. Dozens of officers were hurt, including one who was hospitalized after someone struck her with a pickup truck.

Young said she went to West Philadelphia to pick up her friend’s teenage son, whom she refers to as her nephew. She said she was driving down Chestnut Street toward 52nd Street when she encountered agitators who were throwing debris at police. She tried to make a U-turn, she said, when about two dozen police officers, some with shields, encircled her vehicle and demanded she get out.

Some officers can be seen on a bystander’s cellphone video smashing the windows, then pulling Young and the teenager out of the vehicle and beating them while they were on the ground.

Neither was charged with a crime.

As officers handcuffed Young and put her in a police wagon, others could be seen on the video pulling the toddler out of the backseat of the vehicle. Young’s mother said she found the child with officers in a cruiser in Center City miles away.

It’s not clear where the child was between when he was taken from the back of the vehicle and retrieved by his grandmother. Police said the amount of time he was with officers was no longer than an hour.

Last week, Young filed a lawsuit against the National Fraternal Order of Police, which two days after the incident posted a photo of a Philadelphia police officer holding Young’s then-2-year-old son. Philadelphia Police said investigators could not determine who took the photo.

The nation’s largest police union shared the image on Facebook and Twitter alongside captions that read: “This child was lost during the violent riots in Philadelphia … the only thing this Philadelphia Police officer cared about in that moment was protecting this child.”

The group removed the posts within hours, saying in a statement the next day they took them down after learning “of conflicting accounts of the circumstances under which the child came to be assisted by the officer.”

The lawsuit, filed by Young and her child, seeks damages for invasion of privacy and infliction of emotional distress.

The National FOP did not respond Monday to a request for comment.