An 18-year-old homeless man was arrested in connection with a mugging on Q Street in South Portland early Saturday morning, police said.

Police said Shane Cote, 18, was charged with Class B robbery after assaulting and robbing a 57-year-old man who was walking to work.

Police said that Cote came up from behind the man about 5:45 a.m., violently assaulted him and took his belongings before fleeing on foot.

Shane was stopped by police in a nearby roundabout area at Cottage Road and Ocean and E streets. A police dog tracked a trail from the scene of the robbery to Cote’s location.

Cote was being held at the Cumberland County Jail on $1,000 bail.