WASHINGTON — A closely divided Supreme Court refused Monday to hear a Second Amendment challenge to the bans on semiautomatic rifles in Maryland, California and eight other blue states.

Gun rights advocates say these AR-15s are owned by millions of Americans, and they argue the Second Amendment protects weapons that are “in common use by law-abiding citizens.”

But they fell one vote short of winning a hearing on the question before the Supreme Court.

Three conservatives — Justices Clarence Thomas, Samuel Alito and Neil Gorsuch — voted to hear the Second Amendment challenge.

But Justice Brett Kavanaugh refused for now to cast the key fourth vote. He called the lower-court ruling upholding Maryland’s ban “questionable,” but agreed with the majority in turning down the appeal for now.

“In my view, this court should and presumably will address the AR–15 issue soon, in the next term or two,” Kavanaugh said.

The closely watched appeal had been pending since December, and the outcome suggests that the majority, including Chief Justice John Roberts, is not ready to strike down state laws that restrict semiautomatic guns.

Monday’s no-comment orders let stand laws in Maryland and Rhode Island that forbid the sale or possession of “assault weapons” and large-capacity magazines.

California adopted the nation’s first ban on assault weapons in 1989. Since  then, Connecticut, Delaware, Hawaii, Illinois, Massachusetts, New Jersey, New York and Washington have enacted similar laws, all of which would have been struck down if Maryland’s law were ruled unconstitutional.

Lawmakers in California and nine other Democratic-led states say these rapid-fire weapons are especially dangerous and not needed for self-defense.

Maryland said its ban applied to “certain highly dangerous, military-style assault weapons of the sort used in a series of highly publicized mass shootings.”

The case tested the reach of the Second Amendment and its “right to keep and bear arms.”

For more than a decade, the justices have turned away gunrights appeals that challenged local or state bans on assault weapons.

In 2008, the court ruled for the first time that the Second Amendment protects an individual right to self-defense, but its constitutional rulings since then have been modest in their impact.

The justices struck down city ordinances in Washington and Chicago laws that prohibited private possession of handguns, and they ruled states may not deny law-abiding citizens a permit to carry a concealed weapon.

Maryland passed its ban on “assault weapons” after the mass shooting at the Sandy Hook Elementary School in 2012, where 20 children and six school employees were killed.

The law was upheld last year in an opinion written by a prominent conservative judge.

Judge J. Harvie Wilkinson, a Reagan appointee who was a finalist for a Supreme Court nomination in 2005, said the AR-15, AK-47 and similar rapid-fire rifles are not protected by the Second Amendment.

“They are military-style weapons designed for sustained combat operations that are ill-suited and disproportionate to the need for self-defense,” he wrote in a 9-5 decision by the 4th Circuit Court of Appeals. “We decline to wield the Constitution to declare that military-style armaments which have become primary instruments of mass killing and terrorist attacks in the United States are beyond the reach of our nation’s democratic processes.”

The dissenters said the Second Amendment protects the right to the “arms” that are in common use.