San Bernardino County has agreed to pay nearly $400,000 to three former middle-schoolers to settle a lawsuit stemming from a 2013 arrest a federal court ruled unconstitutional.

In October 2013, a San Bernardino County sheriff’s deputy handcuffed, arrested and drove three seventh-grade girls from Etiwanda Intermediate School to the police station to “teach the girls a lesson.”

On Friday, Dec. 21, a lawyer for the girls announced the county has paid them $390,000 to settle their lawsuit.

In September, a federal appeals court ruled that Deputy Luis Ortiz violated the girls’ Fourth Amendment rights when he arrested them because he believed they were being uncooperative in a bullying investigation. The Fourth Amendment to the U.S. Constitution protects the public from “unreasonable search or seizure” or arrest without probable cause.

“The summary arrest, handcuffing, and police transport to the station of the middle school girls was a disproportionate response to the school’s need, which was dissipation of what the school officials characterized as an ‘ongoing feud’ and ‘continuous argument’ between the students,” Judge Jacqueline H. Nguyen wrote in the opinion for the 9th U.S. Circuit Court of Appeals’ three-judge panel. “No reasonable officer could have reasonably believed that the law authorizes the arrest of a group of middle schoolers in order to teach them a lesson or to prove a point.”

On Oct. 8, 2013, Balbina Kendall, then the school’s assistant principal, asked Ortiz, the school resource officer, for help with a group of girls who had been involved in bullying and fighting at school.

The seven girls were put in a classroom together. According to Nguyen’s opinion, Ortiz intended to verify what he had been told about the incidents by school administrators, but found the girls “unresponsive and disrespectful.”

According to the court, an audio tape has some whispering and quiet giggling from some of the girls. The two girls who appeared to have been the aggressors in the bullying told Ortiz they would not stop their behavior.

But the other girls — reportedly the victims of the bullying — didn’t say anything until after Ortiz started making arrests and asked if they needed to be handcuffed.

He arrested and handcuffed three girls, ages 12 and 13, and drove them to the police station. He told them he was not “playing around” and was taking them to jail to “prove a point” and “make (them) mature a lot faster,” according to the opinion.

Ortiz told the girls he did not care who was at fault: It was the “same ticket, same pair of handcuffs.”

“He didn’t know the law, and he didn’t care,” Newport Beach attorney Jerry L. Steering, who represented the three girls in the lawsuit against the county, said Friday. “The moral of the story is ‘don’t arrest somebody unless they committed a crime.’”

Ultimately, the school did not discipline any of the seven girls, and no criminal charges were filed.

According to Steering, the three girls went to the school office that morning to complain they were being bullied and physically attacked by the other girls. The actual bully, he said, wasn’t arrested.

The families of three of the girls sued the arresting deputies and the county of San Bernardino for unlawful arrest in violation of state laws and the Fourth Amendment. (The suit against one of the deputies was later dropped.)

“This is one of the few cases where justice was actually served. In 99 percent of cases, it isn’t,” Steering said. “I think the county was delusional as to what the legal ramifications were of the recorded statements by Officer Ortiz.”

In his original 2014 lawsuit, Steering had asked for $10 million in punitive damages and $10 million in compensatory damages.

Steering credits U.S. District Court Judge Virginia Phillips, who originally ruled against the county in the case.

“Somebody was actually able to enforce a constitutional right that (the girls) were supposed to have had,” Steering said. “Most of the time, you can’t, in the real world, enforce your constitutional rights.”

A year after he arrested the girls at Etiwanda Intermediate, Ortiz made headlines in 2014 when he accused a bullying victim of being an aggressor in a report. The student was suspended until video later emerged showing that the Etiwanda High victim had not fought back.

The San Bernardino County Sheriff’s Department did not respond to a request for comment Friday.

In September, Etiwanda School District Superintendent Shawn Judson said the district has not made any significant changes since the girls were arrested in 2013.

“The district follows its discipline policies and the California Education Code with respect to student discipline,” Judson wrote in a statement. “We partner with local law enforcement agencies to keep our schools safe. This approach has not changed significantly in the last five years; however, we continually review our policies and practices to ensure they effectively serve our students and school community.”

Note: This story has been updated since it was published to clarify the alleged roles of the girls involved.