Image copyright Getty Images

Social media accounts with ties to Russia pushed a huge Twitter trend in favour of an independent California on US election night 2016, BBC Trending has learned. The campaign was one of at least two popular online independence drives with links to the Kremlin.

It was a surprising development on a surprising night. In the early hours of 9 November 2016, shortly after it became clear that Donald Trump would be the next president of the United States, the hashtag #Calexit hit Twitter's list of top trends.

Trump, Brexit... Calexit?

"Calexit" is short for "California exit" - the idea that the US state could break away from the rest of the nation - and the election-night trend seemed to be driven by liberal activists wary that heavily Democratic California would be governed by Trump.

Image copyright @yourmegabasic

But BBC Trending has found evidence that the hashtag had some outside help, from accounts run by people based in Russia.

As a result of US Senate hearings into possible Russian influence on the election, Twitter recently released a list of accounts banned from the network because of ties to the Internet Research Agency, a St Petersburg-based "troll factory".

One of the accounts on the list, @CalifroniaRep (the misspelling is deliberate), was a backer of the #Calexit campaign. Trending has seen a partial list of the now-deleted @CalifroniaRep tweets, including dozens which used the #Calexit hashtag. The Twitter account was also linked to other social media accounts advocating the secession of California from the United States.

You might also be interested in:

There are also indications that the election night #Calexit trend - the hashtag was mentioned 100,000 times in the course of a few hours - was artificially driven by automated bots or fake accounts. Several of the most retweeted messages under the hashtag were posted by accounts with just a few hundred followers. And some of those tweets were retweeted thousands of times, an unlikely - though not impossible - occurrence.

In the hours after it became clear that Trump would win the election, one #Calexit tweet by a California teenager was the most retweeted message using the hashtag:

Although this tweet was repeated 10,000 times, nearly 2,000 of those accounts have since disappeared from Twitter, indicating that they were potentially automated bots, fake accounts, or otherwise violated the network's terms and conditions.

The Internet Research Agency and other Russia-based hacker networks have been known to use automated accounts to push social media trends.

Russia has consistently denied any interference in the US election. Trending contacted the Russian Embassy in London and the Russian Ministry of Foreign Affairs for comment but they did not respond.

Yes California

The California independence movement has been spearheaded by a group called Yes California. One of the group's co-founders, Louis Marinelli, opened a self-styled California embassy in Moscow, and later moved to Siberia.

Image copyright Yes California

Marinelli attended a conference of Western secession movements in 2016, along with representatives from similar groups from Texas, Puerto Rico and Northern Ireland. The conference was organised by the Anti-Globalisation Movement, a group that has received money from the Russian government, according to Casey Michel, a reporter for the left-wing news site ThinkProgress.

"It had received funding from the Kremlin to organise this conference to pay for the travel and lodging of American and European secession movements," Michel says.

Marinelli denies any links to the Kremlin or receiving any money from the Russian government. He tells Trending he now plans to return to the United States and rejoin the independence movement which he co-founded.

"I know a lot of people had some problems with us reaching out to Russia, but what we like to remind people is that when the United States was looking to become an independent country, they looked to France," Marinelli says. "We didn't ask for financial support or military support from Russia."

Calexit - and Texit

The campaign for California independence is not the only American secession movement with links to Russia. Heart of Texas was for a time the most popular pro-Texas independence Facebook page, with more than 250,000 followers. But US Senate hearings on Wednesday revealed that the account was allegedly run by the Internet Research Agency.

Image copyright US Congress

You might also be interested in:

In addition to pro-Texas independence content, the page pumped out anti-Muslim stories and created a confrontation with followers of another Internet Research Agency page, United Muslims of America. At one point in May 2016, those behind the two pages scheduled rival events at the same time and same place in Houston.

"What neither side could have known is that Russian trolls were encouraging both sides to battle in the streets and create division between real Americans," said Richard Burr, the Republican chairman of the US Senate intelligence committee which has been investigating social media interference in the 2016 election.

"Ironically, one person who attended stated, 'Heart of Texas promoted this event but we didn't see one of [their members]'. We now know why.

"It's hard to attend an event in Houston, Texas, when you're trolling from a site in St Petersburg, Russia. Establishing these two competing groups, paying for the ads and causing this disruptive event in Houston cost Russia about $200," he said.

Image copyright US Senate Image caption Senate hearings highlighted the Heart of Texas Facebook account, which had more than 250,000 followers...

Image copyright US Senate Image caption ...it was used to place an advert to publicise an anti-Muslim event

Image copyright US Senate Image caption Russian agents were also said to have operated a Facebook group that promoted pro-Islamic themes...

Image copyright US Senate Image caption ...it created an event for its followers at the same time and place as the anti-Muslim rally

Image copyright US Senate Image caption Senator Richard Burr said it had cost Russian trolls about $200 to cause the resulting disruption in Houston, Texas

Reporting by Will Yates

Blog by Mike Wendling

Do you have a story for BBC Trending? Email us.

More from Trending: The all-female groups discussing harassment

Image copyright Getty Images

A series of allegations against prominent men has begun to surface on social media - in all-female groups on WhatsApp, shared Google Docs, and Facebook pages - in the wake of allegations of sexual assault and rape against Hollywood producer Harvey Weinstein. READ MORE

You can follow BBC Trending on Twitter @BBCtrending, and find us on Facebook. All our stories are at bbc.com/trending.