The Second Amendment was based on a provision of the 1689 English Bill of Rights. In the English Reformation, Protestant and Catholic mobs would periodically attack one another. At one point, James II disarmed the Protestant mobs. This proved unpopular, so the English Bill of Rights makes the following provisions:

> [whereas] …By causing several good subjects being Protestants to be disarmed at the same time when papists were both armed and employed contrary to law;
>
> […therefore] That the raising or keeping a standing army within the kingdom in time of peace, unless it be with consent of Parliament, is against law;
>
> That the subjects which are Protestants may have arms for their defence suitable to their conditions and as allowed by law;

The defense was collective (and legally regulated!), not individual. The part about the standing army is worth noting as well. The police weren't invented until 1829 century by Robert "Bobby" Peele. So how did they stop crime? Sherifs would round up a posse as needed, towns would have night watchmen, and areas would have militias. A standing army was a centralized military that was controlled by the king instead of by local forces. In the US, standing armies were super unpopular, but Washington and others recognized that practically speaking, you can't win a war with a militia (the equivalent of a police department). The founders said negative things about standing armies but couldn't bring themselves to ban them.

In the American context, there were two particular cases people worried about that the Second Amendment was meant to address, besides just having a non-federal military.

First, in border territories with Native Americans, every eligible white male would be drafted into the militia. If the Federal government wanted to cede some territory to the Indians against the wishes of the residents (ala Israeli settlers in Gaza), it could just make a law to disband the militia. This would effectively cede the territory because they wouldn't be able to prevent raiding. Not a likely move by the federal government, but possible and something to prevent.

Second, in slave territories, every eligible white male would be drafted into the slave patrol. If the Federal government wanted to force the end of slavery, it could just disband the slave patrols and the specter of slave revolts would make the continuation of slavery impossible. This was a real possibility and one that slavery supporters wanted to cut off.

So, is the second amendment an individual right or a collective right? It is an individual right to participate in the armed forces.

Why does such a right matter? Look at Hong Kong right now. So far, only the local police are involved. In Shenzhen, just across the water, there are enormous numbers of PLA troops hanging around and doing "exercises" but so far only the local police have been involved in the protest clashes. To win a revolution requires the organized people with guns to decide to go with the masses rather than their political leaders, and that requires the armed forces to be composed of and identity with the people. The HK police have already begun to turn against HKers. The PLA does not give one single crap about HK and if they come in, they will smash the city to the ground.

The only way to prevent tyranny in the US is for the armed forces to think of themselves as "Americans" and not "The President's Army". To the extent that we have crime problems in cities, it is because the people who are shooting and get shot don't trust the police to solve their problems, so they do it themselves. There must be unity between the masses and the people with guns for there to be democracy. That was the goal of the second amendment.