CHARLOTTE, N.C. -- A North Carolina man has been sentenced to three and a half years in federal prison after stealing mail from people in several communities, according to ABC-affiliate WSOC and the Associated Press.

Federal prosecutors said the investigation was the largest recovery of stolen mail in the Charlotte area in the last 15 years.

Erik Magana, 34, stole checks and credit cards in the middle of the night to commit bank fraud and identity theft, stealing nearly $250,000 from at least 1,300 people, according to federal prosecutors.

Magana drove a 2017 Mercedes sedan through neighborhoods in several North Carolina towns including Charlotte, Davidson and Gastonia as well as Fort Mill, South Carolina, according to court documents.

Investigators began their search for a thief after hearing from people who have reported missing mail since 2016.

They found piles of stolen mail in Magana's Charlotte home.

"Contained within the defendant's apartment were undelivered Hamilton tickets, Christmas ornaments, merchandise, passports, state and federal income tax refund checks, credit and debit cards, and business and vendor payments, amongst others," prosecutors wrote in court documents. "The time and energy many of these victims expended to obtain replacement tax refund checks from the IRS or North Carolina, cancelling and replacing credit cards, and reissuing checks to vendors for payments cannot be underestimated."

Prosecutors wrote that over an approximately one-week period "he was tracked during the overnight hours driving through Charlotte-area neighborhoods almost every day that mail was delivered. Postal Inspectors also personally observed the defendant stealing mail by reaching his arm through the open window of his vehicle."

Magana would then take stolen checks, sometimes forging the recipient's signature, and deposit them into bank accounts, then quickly withdraw cash before the banks had time to notice the funds were stolen, according to court documents.

Magana sometimes dumped unwanted mail in public places but kept much of it at his home, filling rooms and creating unsanitary conditions that left much of it soiled by bugs or maggots, according to a news release from prosecutors.

In addition to the prison sentence, he was also ordered to pay $77,000 in restitution, which represents documented losses to banks he defrauded, though the actual cost of his fraud is likely much higher, prosecutors said.