A Cumberland County Sheriff's Office cruiser is seen parked outside the Cumberland County Courthouse in this March 20, 2018, BDN file photo.

Scammers are targeting people registered as sex offenders in Maine in a scheme to get gift cards, officials warned Tuesday.

Unidentified people are calling people on the sex offenders registry and posing as a sheriff’s deputy, according to a statement from the Cumberland County Sheriff’s Office.

The scammers are telling their targets that they are in violation of the registry and that to avoid criminal charges they can pay a fine in gift cards.

An official warned that the scammers are posing as two real officers, Deputy Daniel Graham and Sgt. Jim Goskin.

“This IS NOT something the Sheriff’s Office or any other Law Enforcement Agency would do, this is another SCAM concocted to get money from those unaware,” Capt. Don Goulet wrote in a statement.

Follow the Bangor Daily News on Facebook for the latest Maine news.