Image copyright The Washington Post/Getty Images Image caption A makeshift memorial after the shooting in Dayton, Ohio

In the last three weeks US authorities have arrested at least 28 people accused of threatening acts of mass violence. What's behind this surge and could they all be convicted?

The threats ranged from posts on social media and video gaming sites to verbal comments to colleagues and friends. In at least two cases, suspects sent text messages to ex-partners. Hoards of weapons were also found in some cases.

The FBI won't say what is behind the steep bump in apprehensions, some carried out by that agency, others by local police. It's not clear if it marks a growth in threats or simply a rise in awareness and tip-offs.

But former FBI boss Andrew McCabe said on Friday there was undoubtedly a "renewed awareness" focused on the sort of threats that a few months ago might have been ignored by investigators mindful of the right to free speech as enshrined in the US Constitution.

The first amendment offers broad protection of free speech, even if that speech is racist or of a violent nature. Prosecutions in the US are further complicated by the second amendment which safeguards the right to bear arms.

So what can be done to stop a shooter before they strike?

When a threat becomes a crime

More than two dozen people are reported to have been arrested for making threats to carry out mass violence since the 3 August shooting in El Paso.

Many of the alleged plots foiled by US law enforcement included plans to target specific minority groups. But without any federal penalties in place for acts of domestic terrorism - like those that exist for international terrorism - the charges varied - false threats, terrorist threats, illegal possession of weapons and disorderly conduct.

It's unclear how these various cases will fare at trial. For charges asserting threats of violence, the threats must be highly specific, accompanied by evidence of imminent danger.

Image copyright ROBYN BECK/Getty Images Image caption FBI investigators approach the home of a suspected mass shooter

"The whole test is whether something is a clear or present danger," says Martin Stolar, a civil rights lawyer based in New York. You must be expressing a clear intention to commit a crime, he continued, and close to committing it.

A case in Vermont shows how tricky it can be to prosecute. Jack Sawyer, 18, was arrested in 2018 after he threatened to cause mass casualties at his former high school. A friend had informed police, who searched his car and found a 31-page diary entitled Journal of an Active Shooter.

The state's attorney charged Mr Sawyer with four felonies - two counts of attempted aggravated murder, and one count each of attempted first-degree murder and aggravated assault with a deadly weapon, among the most serious charges in Vermont.

Image copyright The Washington Post/Getty Images Image caption A memorial for victims of the Dayton, Ohio shooting

But within months, all four felony charges were dropped. Mr Sawyer walked free in April 2018 and has now been adjudicated as a youthful offender for carrying a dangerous weapon. He will remain under state supervision until he turns 22.

The court found that he had stated his intentions to commit harm but no action followed, says Vermont-based lawyer David Sleigh. "Simply contemplating a crime is not a crime in Vermont."

All states have laws that bar violent threats. Threats made by US mail or interstate commerce, for example, are considered criminal. But those threats generally must include the incitement or solicitation of specific violent acts to be considered criminal.

"You don't criticise someone for speaking, you criticise people for picking up a gun," says Mr Stolar. "When speech crosses the line."

Image copyright The Washington Post/Getty Images Image caption A candlelight vigil for the victims of the El Paso and Dayton shootings in Pittsburgh

Without a designated target, an immediate timeline, or clear preparations to commit assault, violent words may be protected speech.

There must be "action and imminent danger," Mr Sleigh says. "As opposed to trying to criminalise evil or unpalatable thinking."

What happens in other countries?

In terms of free speech protections, the US is singular.

"In some countries, they've criminalised certain types of hate speech that are protected here," says Mary McCord, a former senior national security prosecutor, now legal director at Georgetown University's Institute for Constitutional Advocacy and Protection.

"They have a tool available in those countries to prevent some of the type of speech that can be used to recruit new adherents to an ideology."

What about other countries?

In the UK, for example, an expression of hatred related to a victim's race, religion, disability, sexual orientation or gender identity is illegal.

In Canada, too, there are more restrictions on free speech than in the US. The federal criminal code includes multiple provisions barring hate speech, including those that impose criminal sanctions against anyone who willfully incites hatred in public against an identifiable group, including those distinguished by race, sexual orientation, or mental or physical disability.

Such sensitivities "present barriers," Ms McCord says, "to effectively combat the spread of violent ideologies."

But in the US, she continues, "we respect the first amendment."

Is an arsenal legal?

The implications of the first amendment are complicated by the second, which enshrines the right to gun ownership.

In many of the recent arrests, suspects were found in possession of firearms and other weapons. But even where suspects were found with a hoard of firearms - like 18-year-old Justin Olsen, who was found with more than a dozen rifles and 10,000 rounds of ammunition - the cache of weapons uncovered were legally acquired, and do not provide grounds to prosecute.

Image copyright Long Beach Police Department Image caption Police seized weapons including an assault rifle from a man in California, accused of plotting a mass shooting

"If a person's not prohibited for having a weapon, he could have a bunch of weapons, he could not be breaking any laws at all," says Ms McCord.

She has drafted a proposal to criminalise the stockpiling of weapons for use in a domestic attack.

"That would enable the government to prove his intent," says Ms McCord, giving law enforcement an additional tool to thwart potential offenders before they act. Without standing law specifically addressing domestic terrorism, "law enforcement has to find something to charge [suspects] with because there's nothing that directly applies. They're cobbling things together to charge."

Ms McCord is among a growing number of those within the intelligence community calling for domestic terrorism to be classified as a federal crime, giving law enforcement expanded preventative powers - similar to those that apply to international terrorist groups.

But some civil rights advocates and attorneys balk at giving the US government any more power. They argue that existing laws, when enforced, are sufficient.

"I think the rush to try to expand police authority into regulating rights of free speech or rights to gun ownership should be taken very, very carefully," Mr Sleigh says.

Does the combination of the first and second amendment create a volatility that does not exist elsewhere, he asks.

"I suspect it does. But it's been part of our national project to embrace that liberty and freedom, knowing that it comes with risk."