WILMINGTON, Del. (AP) — A Secret Service officer charged with trying to solicit a 14-year-old girl for sex made an initial appearance Monday in federal court, where he was told he could face 10 years in prison if convicted of trying to transfer obscene material to a minor.

The hearing was held just hours after Lee Robert Moore, 37, was released from a Delaware state prison into the custody of U.S. Marshals.

READ MORE: Baltimore-Area Parents Turn To Facebook For Help Finding Baby Formula

Moore appeared in court wearing blue jeans, sneakers and a long-sleeve shirt commemorating the 2001 Army-Navy football game. He nodded and smiled at his parents and wife, who was holding the couple’s infant son, as they walked into the courtroom. The judge later agreed to delay the hearing for about 15 minutes while Moore’s wife tended to the baby.

Magistrate Judge Sherry Fallon agreed to appoint a federal public defender to represent Moore, based on a financial affidavit he submitted to the court.

“I’m satisfied that you qualify for court-appointed counsel,” Fallon told Moore, who posted $105,000 secured bond last week on separate state charges of sexual solicitation of a child under 18 and providing obscene material to a minor.

A bail agent said last week that a third party paid the $10,500 that allowed Moore to be released on bond in state court. Court records also show that Moore and his wife were the subjects of debt collection actions in Maryland in 2006 and again in 2008.

Fallon scheduled a preliminary hearing for Thursday, at which time she will consider a motion by federal prosecutors to detain Moore pending trial.

Moore’s public defenders declined to comment on the case.

Moore surrendered to authorities in Maryland on Nov. 9 after being caught in an undercover online sex sting by Delaware State Police.

READ MORE: Man Shot Near Gunpowder Falls State Park

His arrest brings new scrutiny to a federal agency already reeling from a series of scandals stretching back to 2012, when more than a dozen agents and officers were implicated in hiring prostitutes during a South American presidential trip. Since then, multiple agents and officers have been accused of wrongdoing. Former agency director Julia Pierson was ousted last year after the disclosure of two security breaches, including an incident in which a man armed with a knife was able to scale a White House fence and run deep into the executive mansion.

According to a federal complaint unsealed last week, Moore often engaged in online chats while on duty at the White House, once asking an undercover officer who he thought was a 14-year-old girl to send him something “exciting” on a day when he was checking IDs for a building entrance and complained that “work sucks today.”

The Secret Service issued a statement saying Moore’s security clearance was suspended Nov. 6, the same day the matter was reported to its Office of Professional Responsibility.

Delaware State Police Detective Kevin McKay said in an affidavit that Moore connected with him using two social media applications while McKay was posing online as a 14-year-old girl.

“He stated he wanted to travel to Delaware and meet in person for sex. Moore made it clear that he knew I was a 14 yr old girl,” McKay wrote.

The affidavit, as well as the federal complaint, go on to describe graphic communications that Moore allegedly had with undercover officers, including sending a picture of his erect penis.

According to the federal complaint, Moore admitted after being taken into custody that he had taken and sent the explicit photograph. Authorities say he also admitted that he had communicated online with other people he thought to be minor girls, and that he was sexually interested in 14-year-old girls.

MORE NEWS: After Derby Scratch, Ethereal Road To Run In Sir Barton At Pimlico, Target Belmont Stakes

(Copyright 2015 by The Associated Press. All Rights Reserved.)