BANGOR, Maine — A Hampden man was sentenced Wednesday in U.S. District Court to 2½ years in federal prison on a gun charge, according to the U.S. attorney’s office.

Michael Campbell, 31, also was sentenced to three years of supervised release.

Campbell pleaded guilty in October to one count of conspiring to make false statements to a federal firearms dealer, according to court documents.

By pleading guilty, Campbell admitted that in June 2012 he twice went to Jimi’s Trading Center in Brewer and falsely completed application forms. He said he was buying the guns for himself but was buying them for people who were prohibited from buying them, according to court documents.

The people for whom Campbell purchased the guns told him which handguns to buy and gave them the cash to do so, court documents said. He also delivered the guns to the people for whom he purchased them.

Campbell faced up to five years in prison and a fine of up to $250,000.