An Oregon teenager who sued his high school after being suspended for wearing a T-shirt that called for a border wall will receive $25,000 and letter of apology from the principal as part of a settlement from the school district, according to a statement his lawyers issued Tuesday afternoon.

“I brought this case to stand up for myself and other students who might be afraid to express their right-of-center views," student Addison Barnes said in a statement. "Everyone knows that if a student wears an anti-Trump shirt to school, the teachers won’t think twice about it. But when I wore a pro-Trump shirt, I got suspended. That’s not right."

The U.S. District Court for the District of Oregon ruled on May 29 that the student could not be banned from wearing the shirt. Following the decision, the school district and student's attorneys worked out a settlement, which will go toward Barnes' attorney fees.

[WATCH: Trump-supporting teen harassed over MAGA hat in Seattle]

"Political speech, whether popular or not, is protected by the Constitution," Oregon House Minority Leader Mike McLane, one of Barnes lawyers, said in a statement. "High school students have the right to express political views subject to restrictions that must be equally applied to all students. This case reinforced that proposition."

Barnes had filed a complaint in Oregon District Court on May 18 that stated he was called out of class after showing up to Liberty High School in Hillsboro, Ore., the day of a scheduled discussion on immigration wearing a shirt that read "Donald J. Trump Border Wall Construction Co ... The wall just got 10 feet taller."

The last line is a quote President Trump used during his 2016 campaign while touting his plan for a new wall on the U.S.-Mexico border.

The lawsuit stated one teacher and one student were offended by Barnes' shirt and called in a security guard to escort the student out of class. He was allowed to return to class after covering the shirt, but later uncovered it. Barnes was sent home later that day as part of a suspension.

The school's student handbook states "only appropriate sayings or pictures are acceptable" on students' clothes.

McLane, a lawyer with Lynch Conger McLane LLP, and Brad Benbrook of Benbrook Law Group in Sacramento, Calif., represented Barnes.

"Addison Barnes should be commended for his courage. The message on his shirt wasn’t the point of this case. We brought the case to police the thought police. The First Amendment does not allow what is going on in too many schools today," said Benbrook.