(CNN) A commercial pilot has been charged with criminal mischief after allegedly writing racist and pro-Trump graffiti at the Tallahassee, Florida, airport, court documents show.

Police charged James Ellis Dees, now a former Endeavor Air employee, with nine counts of criminal mischief after he admitted he wrote such slurs as "#MAGA =NO N**S =NO SP**S" -- derogatory terms toward African Americans and Hispanics -- multiple times, according to court documents. The graffiti was found mainly in airport bathrooms and the parking lot elevator.

Airport police approached Dees and asked about the graffiti earlier this month. When police told him he was identified as the writer after a camera was installed in the parking lot elevator where the graffiti was discovered, the court document said, Dees admitted to writing some of it.

Dees told the officer he had "been going through a 'really tough time,' and has anger issues."

Police released Dees after questioning him, and Dees "began to get on his flight, but then decided that he was not in the 'right state of mind' to fly a plane," according to court documents. He then left the terminal.

Read More