PORTLAND — A Pakistani man detained in Maine while authorities investigated the attempted Times Square car bombing says he harbors no resentment against federal agents, even the ones who detained him at gunpoint.

Mohammad Shafiq Rahman told The Associated Press today that he understands that the agents thought he had close ties to Faisal Shahzad, who pleaded guilty in the Times Square case.

Rahman says he knew Shahzad years ago as a sociable college student – not as the radical Muslim who later said he received explosives training from the Pakistani Taliban. Rahman says he last saw Shahzad in 2002.

The computer specialist from South Portland says he was treated well while in jail for 15 weeks. He was released on Thursday but he still faces an immigration review for overstaying his work visa.