Key West, Florida (CNN) -- Officer Mark Lindback started his day off with a routine contraband check of a jail cell. He pulled up the inmate's mattress, and ducked his head under the bed. He didn't find any shanks or drugs, but he did find papers -- lots and lots of papers.
The inmate immediately became irate.
"He was very insistent on getting back his paperwork," Lindback said. "It made me look more thoroughly to see what it was."
Lindback says he found tax forms, papers with instructions on how to fill out the forms along with various social security numbers and birth dates during that routine check four years ago.
He turned the papers over to his supervisor, not knowing at the time that he had stumbled upon a tax scam in which prison inmates allegedly were attempting to bilk the government out of more than $1 million.
Investigators say Monroe County jail inmates in Key West had been filing false tax return forms for jobs they never had as far back as 2004, and getting thousands of dollars a pop in refund checks.
Using a formula that kept their refunds to amounts under $5,000 per claim, inmates thought they would fly under the radar, investigators say. And they did for years, passing around cheat sheets that showed line by line how to fill out the complicated forms.
The scam however is not a local gig. Investigators and federal officials say it has been going on for decades in state and federal prisons around the country.
"These guys weren't rocket scientists...They didn't just wake up and come up with this great scheme," Monroe County Sheriff Bob Peryam said.
Here's how it allegedly worked: using names of defunct or made up businesses as places of work and a master cheat sheet for salary and other numerical information, inmates filled out 4852 tax forms -- the ones you use if your employer didn't provide you with a W-2.
The inmates sent the forms in and the IRS then issued refund checks, in some cases sending them directly to the county jail. But inmates didn't just fill out the forms for themselves. For a $500 fee ringleaders at the prison filled out refund requests for other inmates, promising they would each get a return of about $4,500.
Some of the prisoners, homeless before their arrests, were unaware of the scam. They gave away their social security numbers for honeybuns, a sweet pastry that inmates can buy in prison. The scammers would then file more refund requests under those social security numbers.
"Whenever someone is booked into the jail we have an intake process where we get all their vital statistics and my understanding is when they would go into the population then this group of people would do their own intake process," said John Ellsworth, one of the detectives who investigated the scheme and has since retired.
Ellsworth said the inmates would say things like "Give us your social security number" or ask "Did you work last year, did you file for taxes?"
Two inmates were charged last month with participating in the scam, along with several members of their families. Investigators say Shawn Clarke and Danilo Suarez were the ringleaders at the Monroe County jail, filling out false tax return forms for themselves, other inmates, and family members.
Both men are accused of using their families to help print out IRS forms and act as personal bank accounts -- cashing the refund checks and having the money deposited into their prison canteen accounts or divided between whoever was in on the scheme. The indictments charging them and their family members with conspiracy to defraud the IRS and filing false income tax returns come four years after the IRS was notified of Lindback's discovery in 2006.
Clark's lawyer did not return CNN's calls for comment. Suarez has no attorney representing him in this case. Neither man has been arraigned yet.
Investigator Ellsworth and jail officials were told the IRS had to conduct their own investigation, despite the mound of evidence they provided the agency.
"For them to start all over from scratch when a case has been handed to them gift wrapped and all they had to do was go forth with the indictments was a little disheartening for me," Sheriff Peryam said. "I can say for sure that if I make a mistake on my tax bill I think somebody will be knocking on my door pretty quick. I don't think it will take 3 or 4 years."
While the IRS was not aware the scam was happening at the county jail it did know it had been running in prisons across the country for decades, Ellsworth said.
The IRS declined to explain why it took so long to act in this case but says it has learned to identify fraudulent refund requests made by prisoners.
"It is not an easy process, particularly considering the fact that some inmates are entitled to tax refunds and that the prisoner population is not static," the IRS said in a statement.
More than $14 million in fraudulent refunds were issued to prisoners in 2004, according to testimony before a House subcommittee five years ago. But the IRS blocked more than $53 million in false claims from prisoners that year.
As the investigation at the Monroe County continues, at least one inmate is still allegedly filing falsified tax returns, according to jail officials, even though he knows about the investigation. And the IRS has been cutting him checks. Jail officials, however, say they have intercepted the checks.
Ellsworth says that as a taxpayer he is angry that billions of dollars may have been stolen from the American people over the years.
"I'm not optimistic unless somebody at the very top says make this stop that these losses aren't going to continue," Ellsworth said.