A Brooklyn mother whose 1-year-old baby was ripped from her arms during a disturbing arrest at the Human Resources Administration building was released from jail after the charges against her were dropped.

Two HRA peace officers have been placed on modified duty and an investigation is underway after video showed an excruciating tug of war between a group of officers and 23-year-old Jazmine Headley, who was facing a slew of charges after the incident that apparently started because there was nowhere for the young mother to sit.

"Like everyone who watched the arrest of Jazmine Headley, I was horrified by the violence depicted in the video and immediately opened an investigation into this case," Brooklyn District Attorney Eric Gonzalez said in a statement. "It is clear to me that this incident should have been handled differently. An HRA officer escalated the situation as Ms. Headley was about to leave the premises, creating an awful scenario of a baby being torn from his mother. The consequences this young and desperate mother has already suffered as a result of this arrest far outweigh any conduct that may have led to it: she and her baby have been traumatized, she was jailed on an unrelated warrant and may face additional collateral consequences. Continuing to pursue this case will not serve any purpose, and I therefore moved today to dismiss it immediately in the interest of justice. Discretion is the better part of valor, and we must be thoughtful and compassionate in evaluating the merit of our cases."

Headley had been charged with resisting arrest, obstruction, trespassing and acting in a manner injurious to a child. She had remained behind bars, however, due to an outstanding warrant in New Jersey.

WATCH: Supporters rally on behalf of Jazmine Headley

Later Tuesday afternoon, a judge ordered Headley to be released from Rikers Island based on the Brooklyn DA's earlier decision to drop the charges. She was released later Tuesday night.

"I just want to thank everybody and all the support that I have been getting in New York and all the great people who have been supporting me," Headley told the media. "I haven't gotten to read all the articles and just all the great things and all of the love and I am accepting it. And I am just so grateful to everyone and I am just happy to be free and I just need to see my boy. So thank you guys."

She must appear in Mercer County, New Jersey, on Wednesday to answer a warrant on charges of credit card theft and trafficking in personal identifying information. A Mercer County judge issued the warrant in July of 2017 after she failed to appear in court for her arraignment.

Video posted to social media shows a group of New York police officers pulling a 1-year-old old boy from his mother's arms at a social services center.

The NYPD is calling the video "troubling," and the commissioner of the city's Department of Social Services says he's "deeply troubled" by the situation and a "thorough" review is underway. Headley's outraged family is demanding justice.

It was pandemonium inside the Human Resources Administration building on Bergen Street in Boerum Hill, as police and HRA security officers apparently tried to take the 1-year-old boy from Headley so they could arrest her.

"I was devastated to see something like that happen to my daughter and grandson, and how this officer yanking on my grandson to get him out of my daughter's arms," Headley's mother Jacqueline Jenkins said. "I want people fired, I really do, y'all shouldn't be working out of a facility where people every day have kids and you don't have any understanding of caring. They are there to take care of their business like everybody else."

According to Jenkins, Headley had gone to the HRA building on Friday morning to ask for day care vouchers for her baby so she could work as a cleaner. Eyewitness News was told the city agency was slow and crowded, so there were no chairs available, and Headley sat on the floor with her son to wait her turn.

Nyasia Ferguson took the video and confirmed that both Headley and her son were not blocking any doors or passageways. When security guards ordered Headley to stand, Eyewitness News is told the mother refused because there were no seats and she had her baby. A supervisor was called - and then police.

"She called five other security guards, all harassing her, bothering her," Ferguson said. "Everyone...was like, 'leave the girl alone, she's not bothering anyone, just sitting there like all day.' They kept harassing her."

Advocates argue her crime was not resisting arrest or trespassing or harming her own child, but simply seeking help from an agency that then had her arrested.

"I was just so disgusted and scared," Ferguson said. "I thought the cops supposed to help you. They just straight up came and attacked the lady."