LOUISVILLE, Ky. (AP) — A federal judge has thrown out a Kentucky teen’s lawsuit accusing the Washington Post of falsely labeling him a racist following an encounter with a Native American man at the Lincoln Memorial.

Nicholas Sandmann, a student at Covington Catholic High School, sued the newspaper for $250 million in February, alleging that it had engaged in “targeting and bullying” and modern “McCarthyism.”

The actions of Sandmann and his classmates were intensely debated after video and photographs emerged of them wearing “Make America Great Again” hats near a Native American man playing a drum. President Donald Trump cheered the lawsuit, posting to Twitter that “Covington student suing WAPO. Go get them Nick. Fake News!”

Federal judge William O. Bertelsman ruled that there may have been “erroneous” opinions published by the Post, but they are protected by the First Amendment.

“Few principles of law are as well-established as the rule that statements of opinion are not actionable in libel actions,” Bertelsman wrote in the 36-page opinion issued on Friday.

Sandmann’s attorneys also threatened legal action against The Associated Press and other news organizations, and filed multimillion dollar lawsuits against the networks CNN and NBC. In a letter to the AP in February, attorney L. Lin Wood called on the AP to “retract and correct” what his letter asserts are “defamatory statements.”

A spokeswoman said at the time that the AP took great care to ensure its stories were measured and fair, reporting the facts of what transpired and adding details as they emerged.

Wood did not reply to an email message seeking comment on the ruling Friday afternoon.

Both Sandmann and the Native American man, Nathan Phillips, say they were trying to defuse tensions rising among three groups on a day when Washington hosted both the anti-abortion March for Life, attended by the Covington students, and the Indigenous Peoples March. Video of the encounter showed Sandmann and Phillips standing very close to each other, with Sandmann staring and at times smiling at Phillips as he sang and played a drum.

In Sandmann’s lawsuit against The Washington Post, his attorneys highlighted seven articles and three Twitter social media posts they considered defamatory to Sandmann.

“The Post ignored basic journalist standards because it wanted to advance its well-known and easily documented, biased agenda against President Donald J. Trump ... by impugning individuals perceived to be supporters,” according to the complaint.

The lawsuit alleged that the newspaper had “conveyed that (Sandmann) engaged in acts of racism by ‘swarming’ Phillips, ‘blocking’ his exit away from the students, and otherwise engaging in racist misconduct.”

Judge Bertelsman said in the ruling that he accepted Sandmann’s contention that “when he was standing motionless in the confrontation with Phillips, his intent was to calm the situation ...”

But he noted that Phillips asserted that he was being blocked from passing, and Phillips’ opinion was reported by the newspaper.

“They may have been erroneous ... but they are opinion protected by The First Amendment,” Bertelsman wrote.