Terrell McCullum did not commit a federal crime by carrying a shotgun and a rifle out of his ex-girlfriend’s house.

Terrell McCullum is currently at the Piedmont Regional Jail in Farmville, Va.

But he is serving a federal prison sentence for it. And the fact that everyone — including the U.S.Justice Department— agrees that he is legally innocent might not be enough to set him free.

A USA TODAY investigation, based on court records and interviews with government officials and attorneys, found more than 60 men who went to prison for violating federal gun possession laws, even though courts have since determined that it was not a federal crime for them to have a gun.

Many of them don’t even know they’re innocent.

The legal issues underlying their situation are complicated, and are unique to North Carolina. But the bottom line is that each of them went to prison for breaking a law that makes it a federal crime for convicted felons to possess a gun. The problem is that none of them had criminal records serious enough to make them felons under federal law.

Still, the Justice Department has not attempted to identify the men, has made no effort to notify them, and, in a few cases in which the men have come forward on their own, has argued in court that they should not be released.

Justice Department officials said it is not their job to notify prisoners that they might be incarcerated for something that they now concede is not a crime. And although they have agreed in court filings that the men are innocent, they said they must still comply with federal laws that put strict limits on when and how people can challenge their convictions in court.

“We can’t be outcome driven,” said Anne Tompkins, the U.S. attorney in Charlotte. “We’ve got to make sure we follow the law, and people should want us to do that.” She said her office is “looking diligently for ways, within the confines of the law, to recommend relief for defendants who are legally innocent.”

These cases are largely unknown outside the courthouses here, but they have raised difficult questions about what, if anything, the government owes to innocent people locked in prisons.

“It’s been tough,” said Ripley Rand, the U.S. attorney in Greensboro, N.C. “We’ve spent a lot of time talking about issues of fundamental fairness, and what is justice.”

It’s also unusual. Wrongful conviction cases are seldom open-and-shut — usually they depend on DNA or other new evidence that undermines the government’s case, but does not always prove someone is innocent. Yet in the North Carolina gun cases, it turns out, there simply were no federal crimes.

Using state and federal court records, USA TODAY identified 23 other men who had been sent to federal prison for having a firearm despite criminal records too minor to make that a federal crime. Nine of them remain in prison, serving sentences of up to 10 years; others are still serving federal probation. The newspaper’s review was limited to only a small fraction of cases from one of the three federal court districts in North Carolina.

Federal public defenders have so far identified at least 39 others in additional court districts, and are certain to find more. And prosecutors have already agreed to drop dozens of cases in which prisoners’ convictions were not yet final.

Some of the prisoners USA TODAY contacted — and their lawyers — were stunned to find out that they were imprisoned for something that turned out not to be a federal crime. And their lawyers said they were troubled by the idea that innocence alone might not get them out.

“If someone is innocent, I would think that would change the government’s reaction, and it’s sad that it hasn’t,” said Debra Graves, an assistant federal public defender in Raleigh. “I have trouble figuring out how you rationalize this. These are innocent people. That has to matter at some point.”

Bruce Schneier’s a security specialist with his own Internet meme. And while most people believe that technology elevates, improves things, Schneier holds that technology magnifies, makes things bigger, good and…