A former California nanny was sentenced to 30 years in federal prison for making child pornography videos with the children in his care, authorities said.

Travis Elconin, 35, of Burbank produced pornographic videos with at least five children, most of whom were 8 and 9 years old, between August 2016 and November 2018, the U.S. Attorney for the Central District of California said in a press release. The government identified eight victims connected to Elconin, according to the release.

The man used his iPhone 8 to film the videos, the U.S. attorney said.

"Elconin used his position as a nanny to exploit and abuse the children in his care, holding himself out as the 'perfect caretaker,' which induced numerous families — including his friends — to hire him," the press release states, citing court documents.

Elconin would place advertisements online for people to hire him as a nanny, writing that his "top priority" was to keep the children in his care safe.

According to authorities, one ad read: “I know how important it is as a parent to know that your children are safe when you’re not around. That would by my top priority.”

Elconin worked with several families. He was arrested in January and admitted to making pornographic videos with four children, authorities said. He pleaded guilty in March to producing child pornography.

During the investigation in California, authorities in Germany contacted the Federal Bureau of Investigation with information that Elconin discussed child sex abuse and exchanged inappropriate images with suspected child sex abusers in that country.

German police said that over the past two years, Elconin exchanged more than 10,000 messages via the dark web and encrypted chat programs. The FBI, which is handling that case, did not immediately return a request for comment from NBC News on Tuesday.

A judge sentenced Elconin on Monday to prison and placed him on supervised release for the rest of his life after he finishes his sentence, the U.S. attorney said.

His attorney, Jonathan Lynn, said in a statement: “Travis Elconin took responsibility for his conduct. He pleaded guilty and apologized to his victims. He understands he has a problem and wishes to receive any treatment that is available while he serves his sentence.”