Justice Samuel Alito wrote for the five justice majority saying "the right to keep and bear arms must be regarded as a substantive guarantee, not a prohibition that could be ignored so long as the States legislated in an evenhanded manner."
http://www.supremecourt.gov/opinions/09pdf/08-1521.pdf