ELIZABETH -- The Scotch Plains-Fanwood school district agreed to pay $110,000 to a former teacher who claimed he was fired because he is gay, according to papers filed in court.

Matthew Richards, 29, agreed to the settlement last May to resolve the lawsuit he filed in October 2014.

Richards, who acknowledges that he is gay, started working as a third-grade teacher at the William J. McGinn Elementary school in August 2011 as a maternity-leave replacement, according to his lawsuit.

After completing the school year, Richards was hired to teach the third grade for the following year.

He completed the 2012-2013 school year, and received reviews from the school principal, who said Richards showed steady and increasing progress, according to the lawsuit, which also says the principal assured Richards that his position was secure.

Then in January 2014, Richards announced he was marrying his partner, the court papers state.

That same month, on Jan. 30, a parent falsely accused Richards of keeping her son after class, after the other students were dismissed "with an innuendo of sexual impropriety," the lawsuit says.

That same parents "spread blatant slurs Richards' sexual orientation and solicited other parents to support her vendetta against Richards," court papers state. They also say the parents sent a letter to the district seeking Richards' termination.

Upset by the attacks, Richards became sick and was hospitalized in February 2014, and when he returned to work, the principal filed a series of critical reviews, the teacher claims in the suit. When asked why the reviews contrasted with the earlier positive assessments, the principal said Richards "was good but not good enough," according to the lawsuit.

"The district terminated Richards' position at the end of the 2013-2014 school year because of Richards' sexual orientation, denying him the opportunity to continue his chosen profession and effectively denying him tenure," and violating the state law against discrimination, the suit states.

Last May, the district agreed to pay Richards' $110,000 to resolve the case, according to papers filed in court.

Richards' attorney Dennis Calo, of River Edge, when reached for a comment Monday said he could not discuss the case.

A lawyer for the school district did not return a call seeking a comment.

The settlement agreement contains a lengthy confidentiality clause. The settlement also includes a clause that the payment can not be construed as an admission of liability by the school district.

Tom Haydon may be reached at thaydon@njadvancemedia.com. Follow him on Twitter @Tom_HaydonSL. Find NJ.com on Facebook.