The city has agreed to pay $300,000 to a traumatized Brooklyn teen who claimed callous school staffers told her to “move on” after a classmate videotaped his rape of her, The Post has learned.

The student, who was then 13, subsequently sued the Department of Education. The filing said she was waiting at a bus stop in East New York in 2015 when a boy from her class, also 13, dragged her into a nearby alley and raped her while filming the assault.

Compounding her trauma, the victim, now 17, said her attacker shared the footage with classmates at Spring Creek Community School.

She alerted a school guidance counselor in the days after the assault but said her horrific account was all but ignored.

“If it happened, it happened,” the staffer allegedly told the girl at the time. “Move on with your life.”

The lawsuit contended that principal Christine Koza was similarly disinterested in her claims and told her to stay away from school until the matter blew over.

Remaining enrolled, she advised, would only “make things worse,” according to the federal suit.

Koza, who had viewed the explicit footage, even told the 13-year-old that the activity appeared consensual, court papers state.

While police began investigating the incident at the time, the distraught victim became increasingly demoralized by the process and abandoned pressing charges.

A month after the incident, she was transferred to another school.

A source said Wednesday the city has agreed to settle the matter for $300,000 and that the arrangement will soon be formalized.

The plaintiff’s attorney, Carrie Goldberg, said the accord has not yet been signed off on.

In a separate federal lawsuit filed in April, four city girls ages 11 to 18 claimed that their reports of sexual assaults — including a school stairwell rape — were repeatedly ignored by apathetic staffers.

Despite being alerted, the DOE employees failed to probe the claims or punish any of the accused perpetrators, according to the suit. That case is ongoing.

“Schools are safe havens, and any allegation of this nature must be treated with the utmost seriousness,” said DOE spokeswoman Danielle Filson. “We have clear policies in place to ensure incidents are reported, investigated and appropriately addressed.”