A South Carolina high school teacher removed from the classroom when he stomped on an American flag while discussing freedom is being paid $85,000 to avoid a legal challenge.

The State newspaper obtained documents under the Freedom of Information Act that show Chapin High School teacher Scott Compton is being paid the settlement by Lexington-Richland District 5, in addition to his salary through June 7.

Compton resigned as part of the settlement after criticism about his actions last December. The documents also show that the school district will pay attorney fees of nearly $32,000 for Compton.

The payments were not disclosed when Compton's resignation was announced March 27.

A school spokesman said Compton's lawyers had indicated they would file a complaint in federal court about school officials who sought his dismissal.