A Portland man was ordered to serve 16 years in prison today after he pleaded guilty to five counts of robbery and one charge of endangering the welfare of a child.

John Libby III, 36, had already pleaded guilty in Cumberland County Superior Court to robberies in Westbrook and Portland, including ones where he and his girlfriend drove to the robbery with her 4-year-old son in the getaway car.

Security video from one store shows Libby wielding a butcher knife.

Superior Court Justice Nancy Mills sentenced Libby to three consecutive eight-year sentences for robbery today, one of which was suspended. After he gets out, he will be on probation for four years and if he violates it, could serve the remaining eight years of his sentence.

Mills also sentenced Libby to two consecutive 10-year terms for two other robberies, but that sentence was also suspended.

Libby also must pay $343 in restitution to Dollar Store Marketplace in Portland and undergo psychological and substance-abuse treatment.