The Milton Hershey School in Hershey, Pennsylvania will pay $700,000 to an HIV-positive teen it barred from entry.

On Wednesday, the Justice Department announced the settlement, which resolves charges that the school violated the American with Disabilities Act (ADA) when it refused the teen enrollment based on his HIV status.

The school has agreed to pay $700,000 to the teen, known by the pseudonym Abraham Smith, and his mother and adopt a policy prohibiting discrimination based on HIV status. It also must pay a $15,000 civil penalty to the government.

The school denied Smith entry last year. School president Anthony Colistra later reversed course, saying the school was reserving a spot this fall for Smith. He also apologized to the family “for the impact of our initial decision.”

“Children should not be denied educational opportunities because they have HIV,” Thomas E. Perez, assistant attorney general for the Civil Rights Division, said in a statement announcing the settlement. “This settlement sends a clear message that unlawful discrimination against persons with HIV or AIDS will not be tolerated.”

The school claimed last year that it denied Smith entry because his HIV status represented a “direct threat” to other students.

The Milton Hershey School was originally conceived as a school for orphan boys by its founders, chocolate magnate Milton S. Hershey and his wife, Catherine.