A South Portland man who has been jailed for more than three months as part of the investigation into the attempted Times Square bombing is set to be released on bail today.

His attorney says there is no indication he had any connection to the failed bombing.

Mohammad Shafiq Rahman, 33, still faces an immigration charge because his work visa has expired.

Rahman was picked up in Portland on May 13. Federal authorities said it was part of their investigation into Faisal Shahzad’s failed attempt to set off a bomb in Times Square on May 1.

Investigators said Rahman and two men arrested in Massachusetts may have given money to Shahzad, a Pakistani-American who lives in Connecticut, through an informal money transfer network — perhaps without knowing how the money would be used.

But Rahman’s attorney, Cynthia Arn, said Wednesday that no connection to Shahzad’s plot was ever suggested either to her or to her client.

“There was never really any serious questioning that I’m aware of as to him being involved with the Times Square thing or any money issues of that nature,” Arn said.

The only connection Arn is aware of is that Rahman met Shahzad about 10 years ago when he lived in Connecticut but that connection would have included many others in the relatively small Pakistani community there. Shahzad pleaded guilty in June to 10 charges in the Times Square case.

Arn said she did work with immigration officials to resolve a matter with Rahman that was unrelated to the Shahzad case, but she would not discuss it.

“It wasn’t anything I really want to get into. It has absolutely nothing to do with terrorism money, it was run-of-the-mill stuff that’s been resolved,” she said.

Rahman’s case now becomes a routine matter of a person who overstayed his visa, seeking to remain in this country, she said. Rahman is married to an American woman, Sara Rahman, and has applied to stay here based on that relationship. Arn said she sees no reason why his request would not be granted.

“If it hadn’t been for the government interest in this, it would have been a very common scenario,” she said. “To me, the real story is a guy overstayed his visa. Other than that, he’s just an ordinary guy and he got caught up in that (investigation) and it’s a nightmare.”

Sara Rahman could not be reached for comment.

Rahman was held in maximum security at Cumberland County Jail for more than three months.

“They did it to be mean, to try to force him to talk,” said Barry Hoffman, honorary consulate general of Pakistan, who is based in Boston. “They brought him to me twice in irons. You don’t do that on a simple immigration charge…They thought they had something on him connecting him to the Times Square bomber which we all know is an abomination.

“I just think they had bad information. They thought they had someone important,” Hoffman said. “Apparently, there’s been no indictment for anything criminal…If they had anything on him — whether marriage fraud, no matter what — they would have explored it.”

Hoffman said the involvement of the Pakistani consulate was solely to ensure that Rahman’s rights were respected, that the Pakistani government does not interfere in the U.S. judicial process.

Arn said she believes Rahman was placed in maximum security for his own protection.

The two Massachusetts men, also from Pakistan, were arrested during a May 13 sweep which included raids on locations in New York, New Jersey and Boston. One of those men, Pir Khan, was released last month pending the outcome of an immigration hearing. Aftab Khan remains in custody.

Arn said Rahman doesn’t know the Khans and has no connection to them.

Federal prosecutors argued against granting Rahman bail, saying he was a flight risk, though they did not argue that he was a danger to the community. After bail was set at $10,000 in early July, officials with U.S. Immigration and Customs Enforcement revoked it.

Arn moved to have the bail reinstated because there had been no change in Rahman’s circumstances that would warrant overturning the initial bail decision. Judge Brenda O’Malley on Tuesday agreed, setting the stage for Rahman’s release.

Rahman is in the country illegally because the work visa he received in 1999 expired. He has applied to stay in this country based on his marriage.

Rahman has lost his job as a computer programmer because of his incarceration and now faces extensive legal fees in connection with the case.

He was being held Wednesday at the Suffolk County House of Corrections in Boston, according to Ross Feinstein, a spokesman for the U.S. Immigration and Customs Enforcement agency.

Staff Writer David Hench can be contacted at 791-6327 or at:

[email protected]