LARGO — A Pinellas County sheriff's corporal resigned recently after an investigation into an alleged extramarital affair revealed a trove of racist, sexist and pornographic images on his personal cellphone.

Shawn Pappas, 46, resigned from the agency at the end of February after investigators found the photos, which include images comparing black people to animals, derogatory memes about the Women's March on Washington and photos he took of his genitals while working on duty at the agency shooting range.

The Sheriff's Office did not announce his departure or the circumstances surrounding it because he resigned before it reached the level of a formal internal affairs investigation.

The case came to light last week as part of an ongoing consent agreement with the federal government requiring the Sheriff's Office to bolster the number of women and minorities who work for the department. The office filed a motion this month to lift the agreement, saying the agency has met the requirements. But James McLynas, a former candidate for sheriff and longtime critic of the department, said he filed a document on Thursday arguing that Pappas' case is an example of why the office still needs court supervision.

PREVIOUS COVERAGE:

Pappas had worked for the office since October 2006, rising three years ago to a corporal in the training division, where he sometimes gave instruction on a variety of topics to both new and veteran employees.

Sheriff Bob Gualtieri said in an interview that McLynas' argument was "a bunch of nonsense."

"It was isolated. Pappas was the ring leader of this," Gualtieri said Monday. "There was no indication there was anything more than that."

The investigation started when the Sheriff's Office received a tip that Pappas, who Gualtieri said is married to a reserve deputy, was engaging in an inappropriate relationship with a corrections deputy. Internal investigators asked Pappas to hand over his personal phone.

What they found were dozens of pornographic photos of women and offensive images with time stamps that were viewed, sent or received both on and off duty.

One shows a white child next to a monkey and reads "Stop racism black children and white children are the same." Another shows a black couple looking at an ultrasound with a doctor. The caption says, "I think he has a warrant....."

The photos also mock women, gay men, American Indians and people with Down syndrome.

"In one day, Trump got more fat women out walking than Michelle Obama did in 8 years," says one meme with what appears to be a photo of the Women's March on Washington.

His photo library also showed photos of his genitals that Gualtieri said were taken at the Sheriff's Office shooting range.

Along with the offensive images, investigators found several videos Pappas had made on duty. A few appear sexual in nature, including one that shows him and another deputy pretending to have anal sex and another of Pappas wearing a hot dog suit and thrusting his body back and forth.

When Pappas was confronted, he resigned, Gualtieri said.

"Because I was going to fire him," he said. "There was no question about it."

Pappas could not be reached for comment.

If an agency employee resigns while under a formal internal affairs investigation, it is posted publicly on the agency's website. But Pappas' Feb. 27 resignation ended the inquiry before it rose to that level. Gualtieri said there is no indication that the offensive images were sent to or received from other agency employees.

"If we had any indication there is anyone else involved, then we would pursue it," he said.

For their roles in some of the videos, four deputies were given written reprimands. Two of those four were transferred from the training division to patrol. One resigned rather than be transferred to patrol.

Investigators also determined through the initial investigation that Pappas and the corrections deputy, who was also married, did engage in an inappropriate relationship. The female deputy was given a written reprimand.

McLynas said he submitted the photos as part of his documents to the court, which have to undergo a judge's review to determine their validity before they can be submitted as part of the consent decree case.

His argument erroneously refers to Pappas as the corporal in charge of the agency's field training program, which is part of the orientation program for new recruits and separate from the training division. But McLynas said Tuesday he still sees Pappas' behavior as problematic in light of the agency filing a motion June 9 to dissolve the consent agreement. The agreement was handed down by the federal government in 1980 setting workforce percentage goals for black, Hispanic and female workers.

"No matter how you slice it, Cpl. Pappas was promoted and then placed in charge of training new recruit deputies," McLynas said.

Gualtieri characterized the corporal job as a "quasi-supervisory position" that takes the lead if the sergeant isn't available.

Pappas' personnel and disciplinary files were not immediately available. A summary of his disciplinary record shows he has been the subject of a few citizen complaints that internal investigations deemed unsubstantiated.

Before Pappas started at the Sheriff's Office, he worked 12 years for the St. Petersburg Police Department as a sworn police officer, said department spokeswoman Yolanda Fernandez.

Pappas now works for Signal-15, a public safety equipment distributor in Largo. A manager who declined to identify himself confirmed Pappas' employment but declined to comment further.

Contact Kathryn Varn at (727) 893-8913 or kvarn@tampabay.com. Follow @kathrynvarn.