Two of the teens that caused millions of dollars in damage by lighting off flares inside a Walmart in Cape Breton  were sentenced in court Wednesday.

While the damage was in the millions, the judge instead ordered that they perform 200 hours of  community service and they were given 18 months of probation.

The teens were sentenced under the Youth Criminal Justice Act and their names cannot be published.

In November of 2017, thick orange smoke from a marine flare filled the Walmart in North Sydney. The incident sent shoppers scurrying to the exits, and the store was closed for several days.

Crown Attorney Steve Drake says there was significant damage to the store.

“Well, it's $4.5 million dollars in damage lost to the Walmart, plus we don't know what the cost was to the community here. We had EHS, police, fire and hazmat team their as well,” he said.

Drake had asked the court to order more than  $1 million dollars in restitution be paid from each of the teens, but the judge called that request "completely unrealistic."

“I don't like to mix the youth matters with the adult matters, but you can imagine yourself the consequences for an adult that caused $4.5 million dollars damage to a local business,” Drake said.

Court heard Wednesday that the incident was a prank gone wrong. One of the teens had searched online how to use the marine flares and then tested the device in the woods.

The store claimed there was residue left on merchandise that couldn't be washed off which resulted in lost inventory.

Drake said the two teens that were sentenced Wednesday were aiding and abetting the third youth who actually lit the flare.

“I don't think they understood the consequences of what could happen,” Drake said.

The third teen, who has already pleaded guilty, will be back in court in July. He is enrolled in a restorative justice program.

With files from Kyle Moore.