BOSTON – A Pakistani man arrested in Maine on an immigration charge during the Times Square bombing investigation is not a danger to the community, but he is a flight risk, a government lawyer said Wednesday.

Mohammad Shafiq Rahman, of South Portland, was one of three Pakistani men in New England 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 in March to an American. He has requested to be released on bail while his case makes its way through immigration court.

During a hearing Wednesday, an immigration official said authorities aren’t claiming Rahman is a “danger to the community,” one of the main arguments typically made by the government when seeking to hold someone without bail. Instead, the government contends Rahman is a flight risk, said Richard Neville, deputy chief counsel for U.S. Immigration and Customs Enforcement in Boston.

U.S. Immigration Judge Francis Cramer did not immediately rule on Rahman’s bail request.

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

“There’s no investigation going on — and there hasn’t been for some time — into him and Faisal Shahzad. It just doesn’t exist,” Arn said.

Rahman, a computer programmer, knew Shahzad when he lived in Connecticut a decade ago because both men were part of the local Pakistani community, Arn said.

He hasn’t seen or spoken to him in about eight years, she said.

During the hearing, Arn told the judge that Rahman has been in the United States since 1999, has no criminal record and got married in March after dating an American woman for two years.