A Maryland man has been indicted for failing to register as a sex offender while working as a music director at three D.C. churches.

Gary Darrell Mabry, 33, is a talented pipe organist, but he also had three prior convictions in D.C. and Prince George's County for sex abuse of children and has spent six years in prison for those crimes.

Now, he's back behind bars, facing three counts of failing to register as a sex offender. At his arraignment Wednesday in D.C. Superior Court, Mabry pleaded not guilty. He remains in custody awaiting a detention hearing.

The Baltimore County man's case came to light in October, after officials at the Matthews Memorial Baptist Church in Anacostia learned that Mabry had been meeting with a 16-year-old girl outside of church and picking her up from school, authorities said.

Church officials investigated and learned of Mabry's criminal past and called police, but they were told that since the girl was 16 -- the legal age of consent in the District -- Mabry had broken no laws.

The case was first reported in October by WUSA9, and the U.S. Marshals Service's Sex Offender Investigations Section picked up on the story after it aired.

Investigators learned that Mabry had also worked at Bethel Christian Fellowship, located at 2220 Martin Luther King Jr. Ave. SE, and Springfield Baptist Church, at 508 P St. NW, and never told the sex offender registries in Maryland or D.C. about his new jobs.

Under the 2006 Adam Walsh Child Protection and Safety Act, registered sex offenders are required to notify authorities about where they live, work or go to school.

Mabry had worked at the churches from March 2009 through October 2012.

In 2001, he pleaded to second-degree sex assault of a child after he had sex with a 13-year-old student at a private school in Southeast Washington.

Prosecutors then said he had intercourse with the student in the school choir room during lunch.

At the time, Mabry was on probation in Prince George's County for sexual abuse of a 14-year-old student at another school where he had also worked as an aide, prosecutors said.