A Maryland man who based his career on his love of children — working with them in schools, camps and church; writing books and lesson plans for them; reviewing television shows and making videos for them — was arrested Friday on charges that he possessed and distributed child pornography.

Sean Kelley, 30, was caring for children in at least three paid positions last year — in Montgomery County public elementary schools and a Burtonsville church — when he became the subject of a pornography investigation.

School and church officials say the children in the sexually explicit images that Kelley downloaded and distributed were neither Montgomery students nor members of the church.

Still, the arrest of a man who worked with children for more than a decade sent waves of alarm through his school and faith communities.

"These charges are extremely upsetting and distressing," Cloverly Elementary School Principal Melissa Brunson wrote in a letter to parents Friday, after Kelley was arrested by Maryland State Police.

Police said that the National Center for Missing and Exploited Children picked up on suspected distribution of child pornography from a computer at Kelley's home in Silver Spring in July. Police began investigating and told Kelley's employers about the ongoing investigation in September.

At that point, Montgomery County school district spokesman Derek Turner said, Kelley was placed on administrative leave from his job as a lunch aide at Cloverly Elementary, where he had worked since October 2016.

He was dismissed from the Kids After Hours day-care program at Cannon Road Elementary, where he had worked for four days, day-care owner Bob Sickels said in a letter to parents Friday.

Sickels said his program had conducted a criminal-background check, using an FBI database, and found that Kelley had a clean record.

Liberty Grove United Methodist Church also put Kelley on leave in September and terminated his employment upon his arrest.

He had worked as a volunteer in 2001 and a staff member in 2006, according to his biography on the church website.

He planned and led activities for children on Sunday mornings at the church he has attended since he was a kindergartner.

"Providing a safe environment for everyone at our church, especially children, is our highest priority," Karen Engle, the chair of the staff parish relations committee at the church, wrote in a letter to congregants Saturday.

Engle added: "As a Church, we pray for Sean and his family. We seek compassion, justice, and healing for Sean."

After obtaining a warrant, police searched Kelley's home at 7 a.m. Friday.

There, they found evidence to charge Kelley with seven counts of possessing images of a child under 16 engaging in sexual conduct and three counts of distributing images of minors engaged in sexual conduct.

His church biography said he has worked in Fairfax County schools as well as in Montgomery County.

A Fairfax County Public Schools spokesman could not immediately confirm whether Kelley had worked in the school system.

He also worked at camps, including Camp Sonshine, a Christian summer camp in Silver Spring where fellow staff members said they found his behavior inappropriate.

Courtney Ferracane, who said she worked with Kelley at the camp from 2010 to 2013, said she worried about Kelley's interactions with young girls.

She and other staff members wrote up incident reports when they saw Kelley with young female campers sitting on his lap, a violation of camp policy, she said.

Another former camp employee, who did not want to be identified because of the sensitivity of the charges, shared a letter he wrote in 2013 urging camp leaders not to hire Kelley again.

"I have made firsthand observations of Sean R. Kelley . . . These observations cause me to have concerns about Sean's interactions with children, particularly younger female minors. These concerns include social media interactions and posts that demonstrate what appears to be an out of the ordinary interest in particular female minors," he wrote at the time.

The camp's current executive director Kirk Carey said that after Kelley was warned not to let girls sit on his lap and repeated the behavior, he was fired.

Kelley also created a website in which he calls himself "Captain Sean" and offers episode-by-episode reviews of children's TV shows, including "Girl Meets World" and "Andi Mack."

He self-published several books for young people. One features a grieving child and a grieving teacher who form a relationship to, in Kelley's words, "help each other through the crazy ride known as 'life'."

Kelley's hand-drawn illustration on the book cover shows the small girl holding her teacher's hand on a roller coaster.

On his blog, he wrote letters at the end of each school year sharing his best wishes for his students.

"But seriously, I miss you all so much," he wrote to one departing class of students. "We spent over 900 hours in the same room together . . . You all just kept getting more intelligent, kind, and beautiful with each passing day. All I could do was love you all more as time went by."

He was being held without bond after his arrest Friday.

Correction: An earlier version of this story reported that Kelley said he received a degree in elementary education at the University of Maryland. The university says he did not.

Donna St. George contributed to this report.