A senior NSA official was allowed to harass women and send sexually explicit messages through the agency’s top secret computer network — with one employee classifying him as a “pathological social deviant,” according to federal documents.

The “deputy chief” was hit with multiple accusations of sexual misconduct back in 2011 and 2012, but details were never disclosed to the public.

BuzzFeed News uncovered them in an inspector general report, which they obtained through a Freedom of Information Act lawsuit. The official’s name was redacted and he was only identified as “deputy chief.”

According to the report, at least one employee filed a complaint against him — saying he sexually harassed four women. However, they later testified that there was never any wrongdoing.

Several other women reportedly complained about the deputy chief’s behavior, which included creepy neck massages on co-workers, but “no action was initially taken by their superiors,” according to BuzzFeed.

The official was reprimanded in 2011 after he was caught using the NSA’s secret computer network to sext, but “did not cease his misconduct,” the report says.

Instead, he “simply stopped misusing chat and relied solely on email to engage in inappropriate written exchanges with females, because he believed it was not monitored and he would not be caught.”

At least one of the official’s alleged accusers came out in support of him during the inspector general’s investigation. They reportedly “denied having been sexually harassed” and said all of the allegations stemmed from “jealousy.”

The inspector general ultimately determined that the official’s behavior did not amount to sexual harassment, but did state that he “used words that denigrate individuals, used offensive language, and engaged in other conduct that could affect his subordinates’ work performance or otherwise impact the work environment” in violation of NSA rules.

“[The deputy chief’s] behavior calls into question his judgment and reliability and therefore his ability to effectively function as an Agency leader,” their report says.

According to BuzzFeed, the official retired following the investigation.