First, it is astonishing that the Ninth Circus . . . . . er, Cicuit made this ruling. Second, while I disagree with the foundation of the ruling justice's opinion (that the right to bear arms was a bulwark against external invasion), they still made the right decision. In point of fact, the Second Amendment was written to balance the power of the people against the power of a strong central government. It still remains (IMO) possible that we may exercise our Second Amendment rights in exactly the manner that the Founding Fathers envisioned.
That is also covered in the opinion.
You should have read the whole paragraph, not just the "external" threat part.
We recently saw in the case of the terrorist attack on Mumbai that terrorists may enter a country covertly by ocean routes, landing in small craft and then assembling to wreak havoc. That we have a lawfully armed populace adds a measure of security for all of us and makes it less likely that a band of terrorists could make headway in an attack on any community before more professional forces arrived. Second, the right to bear arms is a protection against the possibility that even our own government could degenerate into tyranny, and though this may seem unlikely, this possibility should be guarded against with individual diligence
The second amendment was indeed intended to assure and armed citizenry, which could be used to repeal external threats, but which could also be used to contain an out of control government. That last part clearly echos that liberals' liberal:
Certainly one of the chief guarantees of freedom under any government, no matter how popular and respected, is the right of the citizens to bear arms. . . . [T]he right of the citizens to bear arms is just one guarantee against arbitrary government and one more safeguard against a tyranny which now appears remote in America, but which historically has proved to be always possible.
-Senator Hubert H. Humphrey, "Know Your Lawmakers", _Guns_, Feb. 1960