An Oregon high school student who sued his school district after administrators said he couldn't wear a pro-Trump border wall T-shirt will be given a written apology and $25,000 in a settlement.

Liberty High School senior Addison Barnes,18, was suspended earlier this year after he refused to cover up his “Donald J. Trump Border Wall Construction Co.” shirt.

The shirt -- which also features a 2016 Trump quote: “The wall just got 10 feet taller.” -- was worn by Barnes in his “People and Politics” class on a day where immigration would be discussed.

Barnes sued his school, the Hillsboro School District and Principal Greg Timmons, claiming his First Amendment rights had been violated.

Tomi Lahren on Trump-Iran Warning: 'The American Apology Tour Is Over'

WATCH: Trump Brings 94-Year-Old Veteran on Stage, Invites Him to Oval Office

On Tuesday, Barnes' lawyers announced they had reached a settlement with the district.

Timmons will write a letter of apology to Barnes, and the district will pay $25,000 to Barnes to cover his legal fees.

Barnes said in a statement that he brought the case “to stand up for myself and other students who might be afraid to express their right-of-center views.”

Timmons also released a statement after the settlement:

As an educational institution, Hillsboro School District and each of our schools supports, encourages, and celebrates free speech and reasoned debate. We also have a responsibility to ensure that each of our students feels welcome and safe in our schools so they can effectively learn. This was an instance where we were challenged to do both simultaneously and the decision landed on the side of ensuring student safety. Moving forward, we will continue to use professional discretion to meet both objectives and will actively seek ways to turn sensitive situations into learning opportunities.

Watch Barnes react to the settlement on "Fox & Friends" below.

'This Girl or Whatever She Is': DeSantis Draws Response After Calling Out Dem Socialist

'He Wants Heads to Explode': Baier Says Trump Is Trolling Media, Left With Tweets

Former GOP Gov Calls for Trump's Resignation: 'Unfit to Remain in Office'

Hannity: 'Our Rights and Future as a Constitutional Republic Are at Stake'