A South Portland man who took sexually explicit photographs of an 8-year-old girl in 2013 was sentenced Wednesday to serve 16½ years in federal prison.

Wayne Niski, 29, was also sentenced by Judge Jon Levy in U.S. District Court in Portland to serve 10 years of supervised release after completion of his prison term.

Investigators from the Maine State Police Computer Crimes Unit began investigating Niski in January 2015 after receiving a referral from the National Center for Missing and Exploited Children that Google had detected child pornography being uploaded to a Gmail account in Maine, according to a sentencing document filed with the court.

State police detective Chris Tupper obtained a search warrant for the Gmail account and discovered it had been created by Niski and used to send and receive child pornography on several occasions, Assistant U.S. Attorney Craig Wolff wrote in the sentencing document.

Police executed a search warrant at Niski’s home in South Portland on March 13, 2015, and seized a thumb drive with 14 sexually explicit images of a young girl. The data from the pictures indicated they were taken on Aug. 13, 2013, with a cellphone, and the file names included the girl’s first name, Wolff wrote.

Through interviews, police were able to identify the girl and speak to her father, the sentencing document states.

Police also seized a second thumb drive from Niski that contained 160 child pornography images, the document states.

Niski pleaded guilty to the charge of sexual exploitation of a minor last Sept. 10. As part of a plea agreement reached between Wolff and Niski’s attorney, federal defender David Beneman, additional charges of receipt of child pornography, transportation of child pornography and possession of child pornography were dismissed.