The Supreme Court struck down the Washington, D.C. handgun ban in 2008 as unconstitutional on the basis of the 2nd Amendment to the Constitution.
The Second Amendment states: "A well regulated Militia, being necessary to the security of a free State, the right of the People to keep and bear Arms, shall not be infringed." Generally the right to bear arms had been thought of as a collective right the public has, not necessarily a right each individual must be granted. But the 2008 Supreme Court decision asserted that the 2nd Amendment protects also an individual's right to gun ownership, and that Washington, D.C. could not essentially regulate that right out of existence.