An Old Orchard Beach man who admitted to stealing scrap metal from the Portsmouth Naval Shipyard to purchase scratch lottery tickets was sentenced Thursday to one year of probation.

Michael Gamash, 65, also was ordered to pay more than $62,000 in restitution during his sentencing in U.S. District Court in Portland.

Gamash pleaded guilty in June to one count of stealing government property from April 2014 to June 2016.

He was a civilian employee at the Kittery shipyard from 1982 until June 2016, when his thefts were discovered.

Gamash admitted that he stole scrap metal from dumpsters at the shipyard, then sold it to local dealers, according to court documents.

The thefts began after Gamash developed a gambling problem, his attorney, Andrew Edwards of Portland, said in his sentencing memorandum seeking a sentence of probation.

Gamash’s gambling problem began when he started buying scratch tickets before driving to work, a habit that eventually grew into an addiction, Edwards said.

He faced up to 10 years in federal prison and a fine of up to $250,000.