BANGOR, Maine — A local man who admitted to stealing historic photographs and posters from the Bangor Public Library was sentenced Tuesday to two years in prison with all but six months suspended after pleading guilty to a theft charge.

Russell Graves, 28, of Bangor also was sentenced to two years of probation, according to the Penobscot County District Attorney’s Office.

Conditions include his not being at the library while on probation, according to Michael Roberts, deputy district attorney for Penobscot County.

Earlier this year, Graves took 75 Civil War-era cartes de visite, small 2½-by-4-inch portraits that were extremely popular during the war, and about 50 posters from World War I and World War II, he admitted. All of the stolen items, the value of which was pegged at about $31,000, were recovered, Roberts said Wednesday.

Graves was working as a janitor under the city’s workfare program when the thefts were discovered Feb. 25, according to a previously published report. Workfare is a system under which general assistance recipients work for the city or nonprofits in return for receiving their subsidy.

The thefts were discovered after Graves tried to sell some of the items at Maritime International, a buyer and seller of collectibles located about a half block away from the library.

Maritime International owner Paul Zebiak believed something was off about Graves’ story and did not purchase the items as Graves lacked valid identification.

Aware that the Bangor Public Library has a collection of similar war memorabilia, Zebiak contacted the library after the man left his store. Library staff checked the archives and confirmed they were in fact missing a large number of items from their collection.

Prior to Zebiak’s call, the library wasn’t aware of the theft. Police were notified and launched an investigation.

The items were returned to the library by Bangor police shortly after Graves was arrested, Tim Cotton, spokesman for the department, said Wednesday.

Graves faced up to five years in prison and a fine of up to $5,000 on the Class C theft charge.

BDN writers Nick McCrea and Dawn Gagnon contributed to this report.