Follow CBSMIAMI.COM: Facebook | Twitter

TITUSVILLE (CBSMiami/AP) — A Florida sheriff’s deputy helped stop a man who from Texas who said he wanted to “rape, kill, and cannibalize” a child.

READ MORE: Attorney: School Gunman Nikolas Cruz To Plead Guilty To Massacre; Parkland Families React

Alexander Nathan Barter, 21, reportedly posted an online ad about trying “necrophilia and cannibalism and see how it feels to take a life.” Brevard County Sheriff Wayne Ivey said one of his deputies, who also works for U.S. Immigration and Customs Enforcement, saw it and offered Barter a child.

Alexander Nathan Barter (Source: Shelby Co. Sheriff’s Office)

READ MORE: Nikolas Cruz Pleads Guilty In BSO Jail Guard Attack

Ivey said deputies then drove to Joaquin, a town of fewer than 1,000 people near the Texas-Louisiana line, and met with Barter.

Barter was arrested on charges including criminal attempt of capital murder and confessed before thanking the agents for “stopping him because he couldn’t stop himself.”

MORE NEWS: Parkland Survivor David Hogg On Potential Guilty Plea: 'It's Horrific That Our Community Has To Continue Going Through This'

(© Copyright 2018 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)