The third Saturday of August 2016 seemed like a big day for Donald Trump in Florida.

A group called “Being Patriotic” had organized more than a dozen “Florida Goes Trump” rallies throughout the state — from Clearwater to Jacksonville to ­Miami. They bought Facebook advertisements for the occasion and hyped a “patriotic flash mob” for him. They even paid someone to build a large cage on a flatbed truck that could hold a costumed Hillary Clinton impersonator in prison garb.

Instead, the pro-Trump rallies were just a small piece of an expansive shadow campaign engineered thousands of miles away by Russians who gained what prosecutors said Friday was a keen understanding of the fault lines of U.S. politics. From staging events on the ground in political battlegrounds to spreading misinformation across social media, the operation functioned in effect as a third party injecting itself into the hotly contested 2016 presidential race — exploiting the vulnerabilities of Democratic nominee Hillary Clinton and stoking ethnic tensions to help Trump become president.

The Russian effort to meddle in the 2016 presidential election spanned at least two countries and multiple states, and included fake rallies, false identities and divisive slogans intended to magnify Trump’s message and undermine Clinton’s candidacy, according to a 37-page indictment of a notorious Russian troll farm announced by the Justice Department’s special counsel.

“I’m amazed — and I suppose I shouldn’t be — what a widespread campaign it was,” said Republican consultant Doug Heye. “It looks like the size of this was probably bigger than Jeb Bush’s primary campaign.”

The efforts in Florida that August day did not turn out to be particularly impressive. No people showed up to at least one of the proposed rallies, and online photos of some of the other events reveal ragtag groups with Trump signs staking out patches of grass or traffic medians.

But the fledgling events belied a broader Russian scheme. While Clinton and Trump battled one another, Russian saboteurs and propagandists working for the St. Petersburg-based Internet Research Agency were waging a secret political crusade to benefit Trump.

The group, which included 80 people, fashioned itself similarly to an actual political campaign, complete with departments for things such as search-engine optimization, data analysis, technology support and budgeting, according to prosecutors.

“I hate to say it, but it seems like the creative instincts and the sophistication exceeds a lot of the U.S. political operatives who do this for a living,” said Brian Fallon, a spokesman on Clinton’s 2016 presidential campaign. “There were memes and advertisements that were really in sync with the Trump campaign’s rhetoric. The messages were in sync, and they certainly exploited some of our vulnerabilities.”

“To read about it in this level of detail is pretty gripping,” added Fallon — who, like other former Clinton aides, said he was unaware of the Russian meddling as it was playing out in real time.

In announcing charges against three companies and 13 individuals Friday, Deputy Attorney General Rod J. Rosenstein said that “there is no allegation in the indictment of any effect on the outcome of the election.”

But the lengthy document provides the most in-depth look so far at how the Russians studied the Trump campaign and tried to amplify its messages and strategy, if not always in a linear or successful fashion.

The group of Russian trolls, for instance, quickly turned its focus to battleground “purple states” after being advised to do so in June 2016 by someone affiliated with a Texas-based, grass-roots organization.

“Florida is still a purple state and we need to paint it red,” the group wrote two months later, using a false U.S. Facebook account to try to gin up real support for its Florida rallies. “If we lose Florida, we lose America.”

Indeed, the effort appears to have been at its most savvy on social media, where there were echoes of many of the attacks Trump repeatedly leveled at Clinton.

The Russian-funded ads on social media emphasized the notion that Clinton was corrupt, prosecutors say. One trumpeted, “Ohio Wants Hillary 4 Prison,” and another carried the hashtag #HillaryForPrison2016 — mirroring the chants of “Lock her up” that had become commonplace at actual Trump rallies.

The ads portrayed Trump as far tougher on terrorism and more supportive of gun rights than his Democratic rival. Clinton, the ads suggested, was pro-immigration and pro-Muslim.

The ads also sought to stoke real tensions Clinton had with the Black Lives Matter movement, with one claiming: “Hillary Clinton Doesn’t Deserve the Black Vote.”

During the campaign, Trump periodically accused Clinton and the Democratic National Committee of rigging the primaries against her Democratic challenger, Sen. Bernie Sanders (Vt.). That included a late June 2016 tweet in which Trump said Clinton “colluded with the Democratic Party in order to beat Crazy Bernie Sanders.”

And after Clinton narrowly prevailed over Sanders in the Iowa caucuses, the Sanders campaign, too, complained of voting irregularities and never got the full recount it sought.

The Russians seized on this theme, using it in political advertisements they placed on social media, including one that said, “Hillary Clinton has already committed voter fraud during the Democrat Iowa Caucus.”

Fallon said it was stunning to realize that the Russians understood how Trump was trying to woo disaffected Sanders supporters and use that knowledge to exploit divisions within the Democratic Party.

“That takes a very sophisticated understanding of U.S. politics to know that would be a damaging line of attack,” he said.

In late September 2016, the Russian trolls allegedly created and bought Facebook ads for a series of “Miners for Trump” rallies aimed at bolstering a critical constituency for Trump: coal miners in Pennsylvania.

Blue-collar voters in the nation’s Rust Belt were a key target for the Trump campaign as it sought to pick off some traditionally Democratic states and create a path to victory in the electoral college. With coal miners in particular, Trump repeatedly cast himself as a champion and Clinton as a villain.

In one September speech in New York, Trump claimed that Clinton “wants to shut down the miners just like she wants to shut down the steel mills and shut down the steelworkers and we’re not going to let it happen. . . . We’re going to put our great miners and our steelworkers back to work.”

In Florida, meanwhile, the Russians had pushed ahead with their planned day of “purple state” rallies.

Jim Fritsch, a retired real estate development consultant in St. Petersburg, Fla., said he received a phone call that August from a young man who was associated with the “Florida Goes Trump” group. The man, whose name Fritsch said he does not recall, asked if he would be willing to wave signs in support of Trump.

At the time, Fritsch was running for local property appraiser and doing sign-waving of his own. He agreed to help with the Trump rally, but said that the man on the phone ultimately produced no volunteers and no signs.

Instead, the participants at the Aug. 20 event were all supporters of his own — ultimately unsuccessful — campaign.

Fritsch dismissed concerns over the Russian effort as a waste of time, saying the Russians did nothing differently in 2016 than the Communists did for years in Soviet days.

“When you’re a candidate for public office and somebody says, ‘We want to help this candidate that you support too,’ it’s not a big leap to say, ‘I’ll help,’ ” he said. “If the Russians wanted to help someone or hurt someone, they’re free to do it.”

“If someone from Russia said, ‘Hey, we think you ought to support Trump,’ who cares?” Fritsch concluded.