PITTSBURGH (AP) – The former mayor of a western Pennsylvania borough has been sentenced to seven years on a federal child pornography conviction.

Forty-seven-year-old Edward Bayne III, ex-mayor of Seven Fields in Butler County, pleaded guilty to the charge in July.

Prosecutors said investigators in 2012 found thousands of photos and videos that he had obtained through Internet file-sharing networks.

Bayne was also ordered to pay $12,000 in restitution to four people identified in the material.

Bayne was mayor from 2006 until 2013. He stepped down after state police seized his computers.

(Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)