Demetrius Anderson was barely out of the shower last week when he saw cops outside his apartment in New Haven, Conn.

Confused, the 43-year-old Philadelphia native grew more bewildered when they knocked on his door, identified themselves as U.S. marshals, and said they were looking for him.

Within minutes, Anderson said, he was handcuffed and taken to court to learn why. Authorities had determined he had been mistakenly freed early from prison 13 years ago, and now he owed them more time behind bars.

As soon as next week, Anderson may have to begin serving an additional 16 months in federal prison, all because of a scenario he and his lawyer have called unusual and unjust: an apparent clerical error that enabled him to be paroled early from a Connecticut prison despite counterfeiting and identity-theft crimes he committed in the Philadelphia area more than 15 years ago.

“It’s bleak, it’s dark, it’s unimaginable, it’s scary as hell,” Anderson said in a telephone interview Tuesday, describing how another prison sentence could upend a life that now includes two jobs, an apartment, and involvement in a local church. “I couldn’t see how to even possibly rebuild at all from it. ... I think it would literally just wipe me out.”

Anderson and his lawyer are scrambling to try to prevent his belated incarceration, the roots of which remain something of a bureaucratic mystery.

Robert Clark, a spokesperson for the U.S. Marshals in the Eastern District of Pennsylvania, said that Anderson’s surprise apprehension was triggered after an internal audit of custody detainers, and that arresting him again was a way to ensure he was “brought to face justice.”

James Burke, the U.S. Marshals chief deputy in the district, added that such audits are conducted “periodically,” but said he did not know why Anderson’s case was discovered 13 years after his release.

Burke said that the Marshals Service places detainers on inmates in state prisons awaiting federal sentences to ensure that they can be held until a transfer is ready.

Andrius Banevicius, spokesperson for the Connecticut Department of Correction, said Wednesday that his agency had no record of anyone lodging a detainer against Anderson, which apparently cleared the way for his release over separate forgery counts in November 2006.

Burke disagreed, saying: “It’s our belief the detainer was issued at the time and [Anderson] was mistakenly released.”

Anderson said he assumed at the time that his federal sentence had simply run concurrently to his imprisonment in Connecticut. After his release, he said, he went about rebuilding his life in New Haven and currently works with the city’s parks and recreation department and for a nonprofit in human resources.

He’s worried that could all fall apart next week.

Anderson’s original crimes were committed in Philadelphia, Plymouth Meeting, and Cherry Hill in 2001 and 2003.

Court documents provide this chronology: Anderson twice tried to use someone else’s identity in September 2001 to submit credit applications to buy cars. When police were about to arrest him at a Mazda dealership, he sensed a problem and drove away, striking a police officer who was there to arrest him. He later was sentenced to five to 23 months in prison for simple assault.

In September 2003, Anderson twice tried to use counterfeit bills worth a total of about $4,000, the documents say.

He pleaded guilty to the crimes in 2005, court records say, and U.S. District Judge Paul S. Diamond ordered that Anderson be sentenced to up to 16 months in prison. Anderson’s defense attorneys at the time acknowledged in sentencing memos that any federal sentence would begin after his Connecticut incarceration, but Anderson said he figured when he was let out in 2006 that he had served all his necessary time.

“I couldn’t free myself,” he said, adding that he stayed in the area and reported to a parole officer afterward, behavior that he said was hardly indicative of someone trying to hoodwink the system.

His life has not been without difficulty since being released; his parents were murdered near Richmond, Va., in 2015. But he said he has worked hard and has never experienced the level of anxiety he’s felt since being arrested last week.

Afterward, Anderson was released on bond and ordered to appear April 4 before Diamond in Philadelphia. Diamond — known as one of the region’s toughest federal judges — has not spoken publicly on the case, but could rule that Anderson be taken into custody again to fulfill his unrealized sentence.

Anderson’s New Haven-based attorney, Michael Dolan, said he’s never encountered a similar situation, and he hopes Diamond might at least consider postponing a ruling so that Anderson can file a motion asking for the case to be dismissed. Dolan also said he plans to file a petition asking President Donald Trump to commute Anderson’s sentence, and he and Anderson have spoken with media outlets in Connecticut, including the New Haven Independent, which first reported on the case Tuesday.

Imprisoning him again, Dolan said, would be counterproductive and flout the idea that the justice system is designed to rehabilitate defendants.

“He’s demonstrated that he’s rehabilitated,” Dolan said. “The correctional system has performed its task. Whatever the goals of a criminal sentence ... this is beyond cruel, and there’s no rehabilitative component here.”

Anderson said he has owned his past and has not sought to avoid accountability under the law. But he doesn’t believe he should pay the price for an apparent clerical error that someone else committed more than a decade ago.

“Everything should’ve happened when it should’ve happened," he said. "It’s not fair to say, ‘Oh, we made a mistake. Now come back and do it.’ ”