CLEVELAND, Ohio -- A Cleveland man who testified in defense of his roommate in a child pornography case admitted on the stand to taking sexually explicit pictures of a then-underage girlfriend, and now faces a charge of his own, federal prosecutors say.

Edward Marrero, 27, said while testifying Thursday that he took the photos in April 2011, according to an affidavit written by FBI agent Lisa Hack. At the time, she was 17 years old and he was 20, authorities say.

Marrero is no longer in a relationship with the woman. He testified that he knew she was underage when he took the photos, the affidavit states.

The age of consent in Ohio is 16 years old, but federal law states it is illegal to create, share or possess sexually-explicit images of anyone under the age of 18.

Marrero was on the stand in defense of Adam Libbey-Tipton, a 31-year-old man charged after the FBI found child pornography on a computer and hard drives seized from his Cleveland home.

Federal agents arrested Marrero following his testimony.

The FBI affidavit says Hack interviewed Marrero's ex-girlfriend in May 2017 and she identified herself and Marrero in an explicit photograph. The ex-girlfriend also confirmed in a follow-up interview Thursday that she was under 18 when Marrero took the photos, the affidavit states.

Marrero was repeatedly told prior to his testimony that he has a Fifth Amendment right against self-incrimination, officials said. However, he still elected to take the stand on behalf of Libbey-Tipton.

He is now charged with producing child pornography. If convicted, he faces between 15 and 30 years in federal prison.

He made his initial appearance Friday afternoon in front of Magistrate Judge Thomas Parker. Preliminary and detention hearings were set for July 6.

Gregory Robey, Marrero's court-appointed attorney, said Friday that he had just been gotten the case and did not yet know much about it.

Libbey-Tipton, following a trial that began Monday, was convicted Friday of three federal crimes, including receiving, accessing and possessing child pornography.

Chief U.S. District Judge Patricia Gaughan will sentence him Oct. 10.

William McGinty, Libbey-Tipton's attorney, did not immediately return a phone call.

If you would like to comment on this story, please visit Friday's crime and courts comments section.