"The requirement that any lawful firearm in the home be disassembled or bound by a trigger lock makes it impossible for citizens to use arms for the core lawful purpose of self-defense and is hence unconstitutional," Justice Antonin Scalia wrote in the opinion of the court.
D.C. law allows citizens to own shotguns and hunting rifles but requires they be kept either disassembled or with a lock attached to the trigger.
Self defense was a cornerstone of the court's decision.
The court ruled that owning guns for self-defense "unconnected with service in a militia" is protected by the second amendment. The amendment's prefatory clause states that a "well-regulated militia" is "necessary to the security of a free State"; today the court interpreted that clause as giving a purpose for, but not limiting the scope of, citizens' right to bear arms.
See the court's full opinion here.