Saladin Ghani thought he could see the writing on the prison wall.

His two-day trial in DeKalb County was coming to an end last Thursday afternoon and he was sure he'd be convicted of stealing $7,000 from a neighbor and sent away for up to 20 years.

Panicked, he came up with an escape plan. He told his lawyer he needed a bathroom break, only Ghani was more interested in a break-out. Fifteen minutes after the defendant had been excused to relieve himself, his lawyer realized Ghani was a goner.

He'd split, right before his jury came in.

As it turned out, the DeKalb resident had no reason to run. The jurors ruled him not guilty. Legally as well as literally speaking, Ghani was a free man.

It took a while for Ghani to find out his good fortune. He had holed up nearby at a friend's house and was incommunicado with his lawyer.  He then saw his story on television.

That's when, Ghani said he "felt kind of stupid" for running, according to an interview with the New York Daily News.

"My mind was going crazy," he explained. "I'm looking at the jury, and the jury don't know nothing. I told myself, 'Let's get out of here.' I have so much at stake."

The bizarre tale from the local courthouse, reported by Channel 2 Action News, gained national attention.

Ghani's attorney, Scott Smith, recalled the moment of surprise.

“I ran out into the hallway, and went into the bathroom at the courthouse. We were on the fifth  floor, and Sal wasn’t in the bathroom,” Smith told Channel 2.

Smith texted Ghani and said, “You cannot leave in the middle of a trial. Come back." Ghani replied, “I’m scared that I’m going to prison.”

His last words at the time: "I'm an innocent man."

The judge then issued a warrant for escape and the trial went on, sans defendant.

Ghani, who was charged with identity theft and fraud, maintained he was framed.  A neighbor had accused him of illegally transferring $7,000 from her bank account to his account in 2013, according to the Daily Report.

Smith called witnesses to raise reasonable doubt. After Ghani fled the courthouse and the judge issued a bench warrant for his arrest, prosecutors pointed to his flight as an admission of guilt.

After the jury found Ghani not guilty, the judge rescinded the bench warrant.

Ghani told the Daily News that he had planned to return and serve his time if he was convicted, but first he wanted to pay off some credit card bills so he wouldn't get out of prison with a mountain of debt.

"I wasn't trying to get away," he insisted. "I wanted my mind to be at ease before I was locked up."