PORTLAND (AP) — A South Portland man who used a gun stolen from a police officer to rob a bank and convenience store has been sentenced to more than 13 years in federal prison.

Joseph Morrill was also sentenced Monday to five years of probation upon release and ordered to pay almost $5,800 in restitution.

The handgun was stolen from a Cumberland County sheriff’s deputy’s private vehicle in September 2012.

Prosecutors said the 24-year-old Morrill used the gun on April 17 to rob the Cumberland Farms in South Portland of $182, and on April 22 to rob the TD Bank branch in South Portland of $5,612.

Investigators used a cellphone Morrill dropped as he made his getaway from the bank robbery on a bicycle to track him down.