TORONTO -- Gun violence in Toronto once prompted Ottawa to enact stiffer mandatory minimum sentences and government lawyers now raise the recent gun deaths of four Toronto-area boys as those penalties undergo a major test.

Ontario's Appeal Court is hearing six gun-crime cases jointly this week since all of the appeals centre on controversial mandatory minimums. Crown attorneys for both the federal and provincial governments were the first to make arguments before the special five-judge panel in a courtroom packed with two dozen lawyers.

The hearings are focusing on the three-year mandatory minimum sentence for possession of a loaded illegal gun. The law was enacted in 2008 as part of the federal Conservatives' omnibus crime bill, but was first proposed in response to a spate of gun violence in Toronto in 2005.

It was dubbed "the year of the gun," but no gun death galvanized politicians as much as the death of 15-year-old Jane Creba. The teen was in a crowd teeming with downtown Boxing Day shoppers when she was hit with a bullet as a gunfight suddenly broke out between two rival groups.

Such shootings threatened Canadian values "by a new gun culture and gun lawlessness," provincial Crown Attorney Riun Shandler told the Appeal Court.

"The plague of handguns in this city continues," he said, pointing to a shooting at a community barbecue this past summer that saw two bystander partygoers hit and killed.

Federal Crown Attorney Moiz Rahman also noted that a 15-year-old was shot and killed on the weekend -- the fourth minor to die in gunfire in the Toronto area this year. The youngest of those victims was nine-year-old Kesean Williams, who was fatally shot in the head by a bullet fired outside his Brampton, Ont., home while he was watching TV.

"Parliament stiffened the penalty so that people...know they have a choice to exercise and that choice is not to possess a loaded handgun in a public place," Shandler said. "Nothing good can come of possession of a loaded illegal gun."

The province has carriage of the cases, but the federal government is intervening in the case and said in court documents filed before the hearings that Parliament is entitled to deference in how it tries to enhance public safety.

The case of Leroy Smickle is expected to be central in the week's arguments. He was caught alone in his boxers in his cousin's apartment posing with a loaded handgun while taking pictures of himself to post on Facebook.

The judge in his case ruled that sending him to prison for three years would be cruel and unusual punishment and she struck down the law as unconstitutional.

Both the federal and provincial governments are arguing strenuously against that finding. Judge Anne Molloy erred in concluding that what Smickle was doing was just "adolescent preening," Shandler argued. There wasn't enough evidence on what Smickle knew about the gun or how long he was holding it to conclude that, he said.

But even accepting Molloy's findings of fact, Smickle should still get the three-year mandatory minimum sentence, Rahman argued.

It was "pure luck" that neither Smickle, nor a police officer, nor a neighbour were shot when Smickle dropped the loaded, cocked gun after police burst in, Rahman said.

Smickle is the only case before the Appeal Court in which the sentencing law was struck down as unconstitutional -- though it was upheld only narrowly in one -- and hearing all of them at the same time gives the court the opportunity to send a uniform message about mandatory minimums in a currently fragmented landscape.

The hearings continues until Friday.