CONCORD, N.H. (AP) — A Massachusetts man has been sentenced to 30 months in prison after being convicted of robbing three banks and one supermarket in New Hampshire and Massachusetts, the U.S. attorney's office said Tuesday.

Joseph Costello, 27, of Wilmington, Mass., was convicted of robbing a bank located inside a Salem supermarket in 2012 and banks in Chelmsford, Reading and North Andover, Mass.

Costello's lawyer Thomas Gleason sought a reduced sentence based on Costello's military service, including nine months in Afghanistan where he said Costello was engaged in multiple firefights and mortar attacks and witnessed multiple deaths. Upon returning to the United States he was diagnosed with post-traumatic stress disorder, and started using heroin. He committed the robberies to support his heroin addiction, Gleason said in court documents.

Gleason did not specify what sentence he was seeking. U.S. Attorney John Kacavas, in the government's sentencing memorandum, recommended a sentence of 46 months — also citing Costello's military record.

He was sentenced on Monday.