BOSTON — A prominent Irishman who lived illegally in Boston for years has been deported, closing a case that has generated fear and anxiety within the state’s sizeable Irish expat community.

John Cunningham returned to Ireland on Wednesday night, a spokesman for U.S. Immigration and Customs Enforcement confirmed on Thursday. The 38-year old electrical contractor had been in custody since he was arrested at his home on June 16.

Federal immigration officials have said Cunningham represented an “enforcement priority” because he overstayed a 90-day visa by more than a decade.

“His significant overstay was cause and reason enough,” ICE spokesman Khaalid Walls said last week. “Someone who overstays a visitor visa is flagrantly violating the granted benefit.”

Cunningham was subject to mandatory detention and wasn’t entitled to a hearing under the terms of the visa.

But advocates of the Irish community in Massachusetts, home to an estimated 12,000 of the nation’s 50,000 Irish living in the U.S. illegally, complained the punishment overlooked Cunningham’s positive contributions.

Cunningham, who didn’t immediately comment through his lawyer, had been a past chairman of the local Gaelic Athletic Association, which organized traditional Irish sports competitions.

He had also appeared on a national news show in Ireland to share his experience of living in the United States illegally months before his arrest.

But Cunningham had also had a warrant for his arrest for failing to show up in court over a $1,300 dispute with a customer.

The Boston-based Irish International Immigrant Center said it’s “a sad day when our government imprisons immigrants who contribute so much to our country and society.”

“Like so many upstanding, hardworking and decent immigrants, John’s deportation makes no sense, and we are not any the more safer for not having him here,” center executive director Ronnie Millar said Thursday.