The District of Columbia made a final defense of its strict ban on handguns Wednesday, the last legal filing to the U.S. Supreme Court before the justices hear arguments on whether the city's three-decades old law is unconstitutional.

The case could produce the most in-depth examination of the constitutional right to "keep and bear arms" in nearly 70 years. Arguments are scheduled in two weeks.

In the brief, which is to be filed by midnight Wednesday, the district argues that the Second Amendment gives people the right to own guns in connection with service in a militia -- not to possess any weapon of their choosing for private purposes.

The city also claims the handgun ban affects only the district -- arguing that the district, like states, has the right to make its own laws. Finally, the district argues its laws do not outlaw all firearms, just handguns.

"The laws of the District of Columbia do not in fact take away the right to keep and bear arms, they were focused on one particular kind of weapon that is particularly dangerous in an urban setting," said Walter Dellinger, a former U.S. solicitor general who will argue the case for the city.

"The citizens of this city really urge us to continue this fight," Mayor Adrian M. Fenty said.

Lawyers for Dick Anthony Heller, a security guard challenging the city's gun laws, have argued that ban must be overturned because it is too broad to comply with the Second Amendment.

Washington's law largely prohibits private ownership of handguns and places strict limits on how other firearms, such as shotguns, can be kept and stored. City officials say that despite the district's relatively high homicide rate, the law passed in 1976 has helped keep violence in check and that it would be much worse if guns were legal.

Six city residents sued, saying they had an individual right to own a gun under the Second Amendment. Courts had generally held that the amendment established only the collective right of states to regulate guns for the purpose of maintaining militias.

But last year, a three-judge panel of the U.S. Court of Appeals for the D.C. Circuit ruled 2-to-1 that the amendment also protects the right of individuals to privately own guns. The city appealed to the Supreme Court, which will hear oral arguments March 18.

More than 60 outside groups have filed briefs with the Supreme Court for both sides of the case.