The Brentwood school district on Tuesday settled a lawsuit brought by Giovanni Micheli, a white student who alleged that he was forced to leave because the schools failed to protect him from bullying by a predominantly minority student body.

Micheli, now 23, who filed the lawsuit in 2010, claimed that he had to leave the Brentwood High School’s Sonderling Center during his sophomore year after being mocked as “white boy” and facing physical threats dating back to sixth grade.

School officials said they couldn’t take action because he couldn’t name the students who threatened him and urged counseling to build his self-confidence.

But the lawsuit alleged they didn’t do more because he was white in a predominantly black and Hispanic school. The total 2014-15 enrollment in the high school, which is split into four different center — was 78 percent Latino, 13 percent African-American and 6 percent non-Latino white.

A trial began Monday in federal court in Brooklyn, but it was settled Tuesday morning at the courthouse. Terms of the settlement were not released by either side.

“The family is just happy to put this behind them and move on with their lives,” said Wayne Schaefer, Micheli’s lawyer.

The lawsuit said that Micheli and his family, of Bay Shore, sought a transfer to another school, but administrators opposed it and told them that if they allowed it they’d have to do the same thing “for all of the other white children that requested it.”

advertisement | advertise on newsday

He left school in 2009, finished his sophomore year with home tutoring and then transferred to parochial school, according to court filings.

The school district, in a statement Tuesday night, said it does not discriminate and called the settlement “satisfactory and in the best interest of all parties.”

“The District has always and remains committed to a safe and secure educational environment for our students and we do everything we can to ensure their safety,” the statement added.