A former superintendent for Allen schools will walk away with nearly $774,000 after announcing his retirement from the Houston-area Katy school district in the wake of accusations that he bullied others in his youth.

Lance Hindt, who led Allen schools from 2013-16 before leaving for Katy, announced his retirement effective Jan. 1 at a school board meeting on Thursday, the Houston Chronicle reported.

“Coming home to Katy to lead this school district where I grew up and attended school was my highest professional honor,” Hindt said in the Chronicle.

But he added that a smear campaign by a “small group” has made it difficult to lead the school district west of Houston.

At a school board meeting March 19, Hindt was accused of bullying while he was a middle school student in Katy 40 years ago.

Greg Barrett, a former classmate of Hindt’s whose last name was formerly Gay, said the superintendent bullied him because of his last name in repeated incidents that made Barrett go so far as to put the barrel of a gun in his mouth.

Video of Barrett’s speech went viral and drew more than 1 million views.

The school district had put together a plan to support Hindt in a defamation case filed on his behalf, the Chronicle said, but it also agreed to send him away with two years’ pay — which comes to about $774,000.

“It’s time for this to come to an end,” board president Ashley Vann said in the meeting, according to the Chronicle. “It’s time to defend ourselves.”

Hindt will still have to reimburse the district for any legal fees up to $25,000, Houston television station KPRC reported.

School board members appeared united in support of Hindt, as did some residents who attended the meeting.

“We all did things that we are probably not proud of when we were kids and didn’t know better, so I don’t think it’s fair,” Olu Okusanya told KPRC.

Barrett, when told of Hindt’s decision, also expressed shock.

“This upsets me. This is not what I wanted at all,” he told the Chronicle. “It breaks my heart.”

Hindt has denied Barrett’s claims that he was involved in bullying him.

“I do not suggest that Mr. Barrett was not bullied, only that I was not part of it. Bullying is wrong. Period. It was then and it is today,” Hindt said in a statement released earlier this year.