A former Cobb County sheriff’s deputy has been sentenced to nearly six years in federal prison after pleading guilty to distributing child pornography earlier this year, federal officials said.

Peter Bilardello, 52, of Marietta, who had worked as a Cobb deputy for 17 years, resigned after he was arrested at his home in August, according to the U.S. Attorney for the Northern District of Georgia Ryan K. Buchanan. As a deputy, Bilardello worked in the sheriff’s office’s sex offender unit, where part of his job included maintaining, updating and verifying Cobb’s registry.

Bilardello was also indicted on five counts of sexual exploitation of children by a Cobb grand jury, The Atlanta Journal-Constitution previously reported.

The investigation began a year prior to Bilardello’s arrest, when Cobb police received a tip from the National Center for Missing and Exploited Children about possible child porn posted online from Marietta, Buchanan said. Information about the crime was initially sent to the NCMEC by the social media site MeWe, which said a user had posted 12 images depicting child sexual exploitation.

Police were able to link the account to Bilardello and executed search warrants on the deputy’s home and phone, Buchanan said. The search confirmed that Bilardello had shared child porn on MeWe and led to the discovery of more child porn on his phone. Investigators also found “multiple chats online about (Bilardello’s) pedophilic desire for young children,” Buchanan said.

Bilardello entered his guilty plea in federal court less than a month after his arrest. He has been sentenced to five years and 10 months in federal prison, followed by 10 years of supervised release, according to the U.S. Attorney’s Office. Bilardello also must register as a sex offender.

“Bilardello’s crimes constitute a horrific breach of the public’s trust,” Buchanan said. “It is an especially sad day when those who take an oath to enforce laws to protect potential victims actually break the law and victimize instead.”

Cobb Sheriff Craig Owens said he supported the verdict.

“Justice was served, and this sentence makes clear that no one is above the law, especially those sworn to protect and serve the public,” Owens said.

Cobb police Chief Stuart VanHoozer said he was grateful for the federal prosecution, which allowed “stronger sentencing.”

“When a law enforcement officer breaks that trust, it reflects on all officers across this profession,” VanHoozer said. “I stand with the honorable women and men of the Cobb County Police Department, with Sheriff Owens and those who serve under his command, and with the remainder of law enforcement professionals across this nation who find acts such as these by law enforcement officers abhorrent.”