PROVIDENCE, R.I. — A Brazilian man has been sentenced to nearly two decades in federal prison and ordered deported when he’s released for enticing a minor to engage in sexual conduct.

The U.S. attorney’s office in Rhode Island says 39-year-old Rafael Leal, who most recently lived in Boston, was sentenced Wednesday in Providence on charges of enticing a minor to engage in illicit sexual activity and traveling interstate to engage in illicit sexual conduct.

Prosecutors say Leal was arrested in October 2016 after an officer found him attempting to engage in illicit sexual conduct with a 14-year-old girl at a Rhode Island beach.

Prosecutors say Leal and the girl met through social media in 2016 and he manipulated her into taking part in sexual encounters.

Leal pleaded guilty in June.