In 1619, the Virginia House of Burgesses passed a law making the transfer of guns to Native Americans punishable by death. Other laws across the colonies criminalized selling or giving firearms to slaves, indentured servants, Catholics, vagrants and those who refused to swear a loyalty oath to revolutionary forces. Guns could be confiscated or kept in central locations for the defense of the community. And in the late 1700s and early 1800s, the state and federal governments conducted several arms censuses. (Imagine what the NRA would say if government officials went door to door today asking people how many guns they owned and whether they were functional.)
On the western frontier in the 19th century, to stave off violence, new towns and cities enacted laws to bar carrying guns. In fact, the typical western town had stricter gun laws than many 21st-century states. Today, four states have completely eliminated permits for handgun ownership and carrying.