PORTLAND – A South Carolina man accused of photographing pornographic images of children and sharing them online with a man in Maine made his first appearance Thursday in U.S. District Court in Portland since his arrest last month.

Daniel Cobb, 37, of Rock Hill, S.C., was arrested in a raid at his home on Nov. 14 after investigators tracked him down through an email address he allegedly used for correspondence related to child pornography, according to court records.

Cobb allegedly sent explicit images of his friend’s daughters, who are now 7 and 9 years old, to David Muise Jr., 26, of 141 Cumberland Ave., Portland. Muise was arrested on federal charges on Oct. 12, court records show.

The two men had been corresponding since April, using Yahoo! Messenger, to discuss and share child pornography, records show.

The investigation into both men began in late September when Portland police were contacted by Royal Canadian Mounted Police after Muise’s girlfriend in Vancouver reported to the Canadian authorities that he had sent her nude pornographic pictures of himself with a 5-year-old girl, according to an FBI agent’s affidavit filed in Muise’s case.

Muise’s girlfriend told Canadian police she recognized the girl in the photo. She provided authorities with her electronic devices and shared her logins and passwords to her email and Facebook accounts, the FBI agent’s affidavit says.

Portland police executed a search warrant at Muise’s apartment at 141 Cumberland Ave. on Sept. 28 and seized a cell phone containing 63 digital images created between June 10 and Sept. 8 containing child pornography that appear to have been produced by Muise, the FBI affidavit says.

Authorities began investigating Cobb after finding 109 digital pictures in a folder on a computer hard drive seized from the raid of Muise’s apartment. The photos depict pornographic images of two pre-pubescent girls, with many of them also showing the body of an adult male, according to a separate affidavit in Cobb’s file by an agent with Homeland Security Investigations.

Authorities in South Carolina arrested Cobb after allegedly linking the images on Muise’s computer to Cobb’s email address and after conducting surveillance at Cobb’s home, the second affidavit says.

Cobb is charged with one count of sexual exploitation of a minor, which carries a punishment of 15 to 30 years in prison, and transportation of child pornography, punishable by five to 20 years in prison.

Muise is also charged with one count of sexual exploitation of a minor. He made his initial appearance in federal court on Oct. 15 and remains in custody pending indictment.

This story will be updated.