TULSA, Oklahoma - Effective on Thursday, a Union Public Schools assistant band director resigned from his post.

Federal prosecutors charged James Wilson, 31, with possessing child pornography, transfer of obscene material to a minor and attempt to sexually exploit children Wednesday. 

Union Public Schools suspended Wilson on Wednesday evening.

A criminal complaint filed by the U.S. Attorney's Office of Northern District of Oklahoma claims Wilson formed an illicit relationship with a 12-year-old girl.

According to Wilson's biography page on Union Public Schools' website, Wilson taught at Sand Springs schools for four years. He also taught at Jenks High School before going to Union in 2012. Until Wednesday, Wilson was director of Union's eighth-grade band and assistant band director for the high school.

Madison Moore is a former student of Wilson's. He says Wilson was his favorite teacher at Sand Springs.

"He was more than a teacher," Moore says. "He was a pretty good friend."

Moore took private trumpet lessons from Wilson, calling him a role model. He says Wilson helped him grow as a person and was someone he looked up to throughout middle and high school. 

But when Moore heard about Wilson's federal charges, he told News On 6 he wasn't that surprised.

"To be completely honest, there were moments that seemed he was kind of close to certain girls," Moore says.

The criminal complaint states Wilson formed an online relationship with a 12-year-old girl living in Canada in 2014.

Investigators say Wilson and the girl used an app called Kik to message back and forth. Wilson posed as a 15-year-old boy. Eventually, investigators say, Wilson asked the girl for nude photos of herself. He pressured her, sending messages such as, "You can trust me" and "You're so beautiful, please, please, please," according to the complaint.

Documents state the girl eventually agreed, and began sending Wilson nude photos.

They say Wilson also sent the girl nude photos and videos of himself. 

Investigators say the girl's mother discovered the photos and messages on her daughter's iPod in December 2014, and called the Manitoba Royal Canadian Mounted Police.

On Wednesday, local authorities served a search warrant and recovered Wilson's computer and electronic devices. 

Investigators say they found 235 photos and videos of "infants, toddlers and children under the age of 18" engaged in "explicit sexual activity."

Wilson admitted to using Kik to contact the girl, investigators say, and admitted to asking her to pose nude for him. He also admitted he believed the girl to be under the age of 16. Investigators say he denied owning the photos of the infants, toddlers and children.

U.S. marshals arrested Wilson Wednesday. He was booked into the Creek County Jail that evening, rather than Tulsa County Jail, "for his own safety," investigators told News On 6. 

Moore says the incident devastated him, and many of his classmates.

"I am pretty disappointed," Moore says, "seeing someone that you looked up to so much doing such a just nasty thing."

Union Public Schools released a statement Wednesday saying the district will cooperate with authorities throughout their investigation.

The district tells News On 6 Wilson never received a complaint or faced any disciplinary action during his employment there.