MIAMI — Fighting a bad cold, Carlos Gomez had decided to sleep by himself that night so he wouldn’t expose his wife.

He awoke to a nightmare. Just before dawn, insistent pounding on the front door jolted the ex-Marine and young father out of bed. Federal agents poured into his Kendall home, pushing his wife aside and rushing to his bedroom. They held guns to his face before slapping him in handcuffs.

“I kept asking, ‘What is going on?’ ” recalled Gomez, who works as a driver for UPS. “I was scared for my life.”

Gomez, busted in a money-laundering scheme, would spend nearly two weeks in a federal detention center and another seven months under house arrest.

It took 222 days before federal prosecutors realized it was all a terrible mistake: A rogue bank worker had stolen his identity.

Thanks in part to Gomez’s own sleuthing, prosecutors eventually discovered he had been wrongfully charged. The Wachovia Bank employee had stolen $1.1 million from customers, then swiped Gomez’s identity to create a checking account under the pilfered name to launder portions of the embezzled proceeds.

Now, nearly three years after the ordeal, Gomez is suing Wachovia for “malicious prosecution.”

Gomez was among 13 co-conspirators named in a 2010 indictment, a list that included the shady banker’s own grandmother. He was charged with participating in a money-laundering conspiracy and structuring withdrawals from his checking account in 2006 to avoid detection by bank regulators – offenses that carried up to 20 years in prison.

PRESUMED GUILTY

But Gomez, whose federal case was built on information mainly provided by the bank to federal authorities, refused to acknowledge a crime he did not commit.

“They say you’re innocent until proven guilty,” said Gomez, 36, a U.S. citizen who was born in Colombia. “In this case, I was guilty until I proved my own innocence.”

Gomez’s criminal defense attorney, Joel DeFabio, said he and his client had to persuade the U.S. attorney’s office and U.S. Immigration and Customs Enforcement to acknowledge that they had the wrong guy –an admission that rarely happens in federal court.

“We never gave up, we never stopped fighting, we never stopped believing, and we told the United States government we were going all the way to trial unless they realized the mistake they had made,” DeFabio said. “And it worked.”

The U.S. attorney’s office and ICE declined comment.

Gomez’s civil lawyers, Jermaine Lee and Eric Hernandez, claim in a lawsuit filed in September in federal court that Wachovia officials were reckless when they failed to protect Gomez’s “confidential” account and to provide “accurate” information about him to federal authorities.

In a key ruling last month, U.S. District William Dimitrouleas rejected the bank’s bid to throw out the civil case, saying Gomez had “sufficiently alleged” that Wachovia violated its “fiduciary duty” to him by allowing an employee and others “to misuse his private and confidential information to launder monies.” As a result, Gomez’s case is headed for mediation and, if still unresolved, trial.

Before his Kafkaesque journey through the U.S. criminal justice system, Gomez was a typical young immigrant trying to work his way into a better life.

He dutifully opened his first bank account after he graduated from high school in Stamford, Conn., where he spent his teenage years. It was with First Union, which would later be acquired by Wachovia. He kept the account active until he joined the Marine Corps in 1997.

After a four-year stint in California, he moved to Miami to live with his mother, attending Miami-Dade College and getting a part-time job as a driver for UPS. In 2001, he reactivated his First Union account but then permanently closed it and switched to Washington Mutual.

He married Shelithea, who worked at South Motors, in 2006 and they bought their first home in Kendall. She had a young daughter from a previous marriage and they would have two more girls themselves.“We were moving forward,” Gomez said. “We were happy.”

Then, early one spring morning in 2011, a police officer stopped by his house to inquire if he had called Miami-Dade police to report something. The officer asked for his ID and verified his name and address. Gomez said he and his wife had not called the police. Both were “unsettled” by the cop’s visit, he said. A week later, on April 6, a squad of ICE agents arrived, knocking on their front door.

Gomez said he was whisked away so quickly that he couldn’t even talk to his wife. He asked one of the agents why he was arrested. The answer: money laundering.

He was transferred from ICE’s holding facility to the federal detention center in downtown Miami, where inmates are held before trial. Stuck behind bars, he said he was so depressed that he couldn’t eat. Three days after his arrest, he finally got to talk with his wife, but still didn’t know what to tell her. Through a family contact, Gomez hired DeFabio to represent him. His lawyer told him that the prosecution had a “solid case” and that he could be facing a long time in prison.

After nearly two weeks in detention, Gomez was freed on a $100,000 bond he got with the help of family members. He also regained his UPS job with union assistance. But he remained largely under house arrest with charges still over his head. Under the bail terms, he could work during the day but had to be confined to his home at night. The Feds would make random calls to see if he were there.

CLEARING HIS NAME

Gomez then began trying to clear his name, starting with a polygraph test on the advice of his defense lawyer. He passed.

Next, after a discussion with his lawyer, Gomez went to a local branch of Wells Fargo, which had acquired Wachovia. He told the branch manager that someone had stolen his identity and asked her if she could look up the address on his checking account number – the fabricated one that had been used to withdraw $135,000 of stolen money from bank customers.

The manager wrote down a Hialeah address — a place Gomez had never lived.

He dug up his old First Union check card with the original account number. It did not match the newly created account number used in the money-laundering scheme. He also compiled his UPS paystubs to show how much money was actually deposited into his real bank account during the period that the money laundering was going on.

In August 2011, Gomez and his attorney finally secured a meeting with the federal prosecutor in his case, Dwayne Williams, and ICE agents. Though it was risky as a legal tactic, they showed all their evidence to the prosecution. The prosecutor grilled Gomez, showed him pictures of other defendants and asked if Gomez had sold his identity to the ringleader: Wachovia bank employee Noel Abraham Mendez.

“Of course not,” Gomez said.

Finally, on Nov. 14, 2011 – following guilty pleas by Mendez and the other defendants – U.S. District Judge Marcia Cooke signed an order submitted by the U.S. attorney’s office dismissing all charges against Gomez.

It was a nightmare, Gomez said, that no one should have to endure – and that could have been easily thwarted by diligent bankers.