A North Philadelphia man who posed as a prosperous European prince to trick young boys into exchanging sexually explicit images with him faces 20 years in prison after pleading guilty in federal court Tuesday to 16 counts relating to child exploitation.

David Milliner, 50, admitted to luring at least four young boys and convincing them to produce sexually explicit images and videos of themselves. He had faced a federal mandatory minimum sentence of 15 years, but agreed to 20 years as part of a plea deal struck with prosecutors that allows him to avoid the maximum possible sentence: life imprisonment.

Appearing in court in a green prison jumpsuit and with his hands clasped in front of him, Milliner mostly gave terse responses of “yes,” “no,” and “guilty” to U.S. District Judge Petrese Tucker’s questions. He listened in silence as Assistant U.S. Attorney Kelly Harrell recounted the evidence against him.

Milliner convinced his victims that he was “Prince Daniel David DeRothschild,” a European royal living in Beverly Hills, Calif. According to investigators, Milliner maintained multiple social-media accounts under the DeRothschild identity to keep up the ruse, and his posts on Facebook — where he used a photo of a nephew of Michael Jackson’s as his profile picture — claimed that DeRothschild was an “heir, socialite,” and “trillionaire.”

From September to December 2017, Milliner used the social-media accounts of “DeRothschild” to lure young boys into sending him sexually explicit messages, pictures, and videos.

Milliner’s ploy unraveled when a middle-school teacher in Michigan reported to local police that she had seen sexually explicit images of a 12-year-old student on a school-owned iPad.

After the student’s mother gave police permission to search the boy’s iPod, which was synced to the school’s iPad, officers found deleted screenshots of Instagram messages between the boy and an account named “X090210” — which was run by “DeRothschild.”

Milliner persuaded the boy to send him a picture of himself naked, among other sexually explicit messages and images. Later, when Milliner asked the boy to send him additional sexually explicit photos, the boy responded that he was unable to because his parents were home.

According to court documents, Milliner continued to prey on children until February 2018.

That month, when Philadelphia police executed a search warrant at Milliner’s home, they found him using his iPhone to converse with a boy on a live-streaming website. The child was waving to Milliner, who lived alone.

After Milliner’s iPhone was searched, authorities found 1,012 unique images of child pornography.

In a phone interview after Tuesday’s hearing, Harrell, who prosecuted the case, said: “This is a fair result. It’s something that spares the victims from having to testify.”

Milliner’s court-appointed lawyer, Angela Halim, declined to comment.

Milliner was previously sentenced to three years’ probation in 2006 after being found guilty of theft. Six other charges against him were dropped.

He has been held without bail since his arrest in February 2018. A sentencing hearing is scheduled for Nov. 21.