One man is in custody after getting trapped inside a convenience store he was allegedly trying to rob north of Toronto.

The robbery happened at a store, which is also used as a Canada Post outlet, in the area of Highway 7 and Kipling Avenue at approximately 4 a.m. on Friday morning.

The suspect entered the store by cutting a hole in the roof, but injured his legs in the process, police said. He tried to leave the store through the front door, but wasn’t able to get out.

The alleged thief caused extensive damage to the property as he tried to escape, police said.

“Some of the damage was caused based on him trying to get out of the store,” said Const. Laura Nicolle of the York Regional Police. “He tried to get back up through the ceiling and tried to actually cut through a wall.”

When the man couldn’t get out, he helped himself to some ice cream in the store and beer he had brought with him, investigators said.

Based on evidence found at the scene, police said the man was trying to steal cigarettes.

Police originally said they were looking for three suspects in the robbery, but later confirmed the man in custody was the only one who entered the store.

The store owner was alerted to the possibility of a break-in when the security alarm went off. She went over to the store to investigate before reaching out to police, and found the suspect inside.

She said she could hear at least two men talking, but wasn’t sure how many people were in the store at the time. She told reporters at the scene it appeared that whoever was in the store was trying to steal cigarettes, as many packages had been taken off the shelves and put into bags.

She then called police, and told officers she recognized the suspect as a customer who had been in the store on Thursday. As she was waiting for police to arrive, she said at least one man escaped through the hole in the roof. She thought there may have been two people that escaped, but wasn't sure.

The suspect is refusing to identify himself, police say. Police are also still investigating how he got onto the roof of the building and into the store.

With a report from Tamara Cherry