BOSTON  — A federal official says a Pakistani man arrested in Maine on an immigration charge during the Times Square attempted bombing investigation is not a danger to the community.

Mohammad Shafiq Rahman of South Portland was one of three Pakistani men charged with immigration violations last month as authorities investigated the May 1 attempted car bombing.

Rahman is seeking to become a permanent U.S. resident based on his marriage to an American.

During a bail hearing Wednesday, an immigration official said authorities aren’t claiming Rahman is a “danger to the community.” The judge didn’t immediately rule on Rahman’s request for bail.

Rahman’s lawyer said he has “no connection” to Faisal Shahzad, who pleaded guilty Monday to 10 terrorism and weapons charges in the Times Square case.