The Supreme Court appeared divided Wednesday on whether so-called assault weapons bans violate the Second Amendment. The justices heard two challenges to bans on semiautomatic rifles that apply in about a dozen states.

According to reporting on the arguments, four conservative justices appeared inclined to find the bans unconstitutional, while the three liberal justices appeared ready to uphold them. The result will likely depend on Justice Amy Coney Barrett and Chief Justice John Roberts. Barrett asked questions suggesting she might favor strict regulations over outright bans, and Roberts appeared unconvinced that AR-15s are too commonly owned to be banned.

Several of the states with these laws passed them after mass shootings, including a 2012 attack at Sandy Hook Elementary School in Newtown, Connecticut, that killed 20 children and six educators. Justice Sonia Sotomayor said an AR-15 is capable of killing many people quickly and asked why the legislature could not judge such a weapon too dangerous to carry.

Gun rights advocates argue that banning some of the most popular rifles in the country is unconstitutional, and they say the weapons are owned by about 26 million people and account for a small share of gun violence. The Trump administration agrees, arguing that the Second Amendment protects weapons in common use. Solicitor General D. John Sauer said the people, not state governments, should decide what is too dangerous. Several justices questioned how to determine whether a weapon is widely adopted.