A South African man who worked for a carnival in Wisconsin has been sentenced to 10 years in federal prison for arranging to meet a young girl for sex at a south suburban hotel.

In federal court Thursday in Hammond, Indiana, U.S. District Judge Rudy Lozano sentenced 29-year-old Brendan Theodore Coetzee, to 120 months for using interstate communications to illicit sexual conduct from a minor, according to the U.S. Attorney’s office for Northern Indiana.

Coetzee, a native of Johannesburg, met the girl, who was under 14 the time, while working at a carnival in Wisconsin over Memorial Day weekend 2015, prosecutors said.

He and the girl stayed in touch on social media, and, according to prosecutors, on June 22, 2015, Coetzee, who was then in northwest Indiana, arranged to meet the at a motel in Lansing, where they had sexual intercourse.

Coetzee was also sentenced to 5 years supervised release.