Updated

The Supreme Court says accidentally shooting a gun during the commission of a crime should bring the same penalties as intentionally using a firearm.

This came as the high court on Wednesday upheld the conviction and sentence of Christopher Michael Dean, who was arrested for trying to rob a bank in Rome, Ga., in 2004.

A gun went off accidentally during the attempted robbery when Dean tried to switch the weapon from one hand to the other.

The discharge brought an automatic 10-year sentence for firing a weapon during a crime. Dean appealed, saying the automatic sentence shouldn't count since the firing of the gun was accidental.

Federal prosecutors said the law doesn't care why the gun went off, and the high court agreed.

Chief Justice John Roberts, who called it "the case of the bungling bank robber" in his bench statement, said the law "does not require that the discharge be done knowingly or intentionally."

If criminals want to avoid the penalty for accidental gunfire, they can "lock or unload the firearm, handle it with care during the underlying violent or drug trafficking crime, leave the gun at home or — best yet — avoid committing the felony in the first place," Roberts said.

Justices John Paul Stevens and Stephen Breyer dissented, saying Congress intended the automatic sentence to only apply to intentional discharges of weapons.

"Accidents happen, but they seldom give rise to criminal liability," Stevens said. "Indeed, if they cause no harm, they seldom give rise to any liability. The court today nevertheless holds that petitioner is subject to a mandatory additional sentence — a species of criminal liability — for an accident that caused no harm."

Roberts replied in his opinion that the accidental gunfire did cause harm. "By pure luck, no one was killed or wounded," he said. "But the gunshot plainly added to the trauma experienced by those held during the armed robbery."