A gay principal in the US state of Oregon says he’s losing his job due to his sexuality.

Tom Klansnic of North Gresham Elementary in Gresham, Oregon, has been the school’s principal for 10 years.

But on Thursday he was told by the Gresham Barlow School District that his contract would not be renewed at the end of the year.

The Associated Press reports several of the school’s parents and students wore pink t-shirts to a meeting of the school board last night in a show of support for Mr Klansnic.

His attorney, Judy Snyder, said she and her client are preparing to file a lawsuit against the Gresham Barlow School District for discrimination and retaliation.

She alleges that school officials began to treat the principal differently after he revealed his sexuality; he subsequently divorced his wife.

The Gresham Barlow School District said it could not comment on the matter.

Oregon state law protects anyone from discrimination because of sexual orientation and gender identity.