WikiLeaks founder Julian Assange has been charged with crimes, as we learned in an inadvertent court disclosure Thursday. And that means that the Trump campaign spent the latter portion of the 2016 election interacting with and even defending and promoting the works of an organization run by a man the U.S. government now believes is a criminal.

President Trump and his aides' decisions to sidle up to WikiLeaks were always problematic. The Obama administration declined to indict Assange over disclosures of sensitive national security information because of concerns about it being regarded as a news organization. But WikiLeaks’s release of Democrats' emails in 2016 was instantly questionable and, according to both the U.S. intelligence community and the Justice Department, done on behalf of a hostile foreign country trying to illegally interfere in the American election. And yet the Trump team pressed forward with its fraught ally out of convenience.

We don’t know what Assange has been charged with — the charges remain under seal — but this has long been a possible outcome.

Here’s what we know about the Trump campaign’s flirtations — at the least — with WikiLeaks.

Roger Stone

The most serious questions about Trumpworld’s interactions with Assange involve Roger Stone, who is a focal point of special counsel Robert S. Mueller III’s Russia investigation. Stone has denied working with WikiLeaks, despite repeatedly claiming in real time to have interacted with it, privately messaging with the organization’s Twitter account, and even appearing to preview its dump of Hillary Clinton campaign chairman John Podesta’s emails.

Stone claimed in an Aug. 3, 2016, email to confidant Sam Nunberg that he had dinner with Assange — something he now says was a joke.

The next day, he claimed Assange was “going to continue to drop information on the American voters that is going to roil this race.” Four days later, he again said he had been in contact with WikiLeaks — something WikiLeaks denied the next day. Stone claimed contact with WikiLeaks again in an Aug. 18, 2016, conference call.

Stone now says all of this was puffery — false claims to make himself seem more important — and that he got information through an intermediary journalist, Randy Credico. (Credico has denied this, and the evidence is mixed.)

But even if Stone’s denial is accurate, he also praised WikiLeaks — even calling Assange his “hero.” “I have total confidence that @wikileaks and my hero Julian Assange will educate the American people soon,” he tweeted on Oct. 3, 2016, a few days before the Podesta email dump. "#LockHerUp.”

And in addition to praising and defending WikiLeaks and Assange, there is also documentation of direct contact — via Twitter, at least. WikiLeaks on Oct. 13, 2016, again denied contact with Stone, prompting him to send direct messages to its Twitter account asking it to lay off him since he was defending it. After Trump won, WikiLeaks messaged Stone saying, “Happy? We are now more free to communicate.”

Donald Trump Jr.

The president’s son also exchanged direct messages on Twitter with WikiLeaks, and may have even taken direction from it on a small scale.

WikiLeaks direct-messaged Trump Jr. on Sept. 20, 2016, giving him a password it discovered for a new anti-Trump PAC’s website, PutinTrump.org. Trump Jr. responded the next day: “Off the record I don’t know who that is but I’ll ask around. Thanks.”

On Oct. 3, 2016, WikiLeaks asked Trump Jr. for help in pushing a story involving Clinton allegedly saying Assange should be droned. Trump Jr. said the campaign “already did that earlier today” and then asked about a “Wednesday leak I keep reading about.” There was no response.

The most significant known bit of possible coordination came Oct. 12, 2016 — after the Podesta dump — when WikiLeaks asked Trump Jr. to promote its leaked Democratic documents so Trump supporters could dig through them. Two days later, Trump Jr. tweeted exactly the link WikiLeaks had put in the direct message — including not using the “http://”.

It’s possible Trump Jr. would have done it anyway — the Trump campaign had been talking about the leaked documents for days — but Trump Jr.'s text was basically exactly what WikiLeaks had requested.

President Trump

There is no documented indication of coordination between the president himself and WikiLeaks. But the president did spend a healthy amount of time promoting WikiLeaks.

“WikiLeaks — I love WikiLeaks,” he said Oct. 10, 2016, in Pennsylvania.

“This WikiLeaks stuff is unbelievable,” he said Oct. 12, 2016, in Florida. “It tells you the inner heart; you gotta read it.”

“It’s been amazing what’s coming out on WikiLeaks,” Trump said Oct. 13, 2016, in Ohio.

“Getting off the plane, they were just announcing new WikiLeaks, and I wanted to stay there, but I didn’t want to keep you waiting,” he said Nov. 4, 2016, just before Election Day. “Boy, I love reading those WikiLeaks.”

After his election and as evidence that Russia was behind the WikiLeaks disclosures, Trump decided to defend Assange and cast doubt on Russia’s role.

“Julian Assange said ‘a 14 year old could have hacked Podesta’ — why was DNC so careless?” Trump tweeted Jan. 4, 2017. “Also said Russians did not give him the info!”

After that raised a stir, Trump clarified: “The dishonest media likes saying that I am in Agreement with Julian Assange — wrong. I simply state what he states, it is for the people . . . to make up their own minds as to the truth. The media lies to make it look like I am against ‘Intelligence’ when in fact I am a big fan!”

The reason that tweet caused a stir is that questions about the legality of Assange’s work — and who his allies are — have lingered for years. He has long disclosed things that harmed the U.S. government, and he’s drawn bipartisan condemnation for it.

Even as he was selling something clearly helpful to Trump, basically any politician would know you tread lightly with Assange and WikiLeaks. You never know what might come next to make embracing them look foolish.

And the charges against Assange could make all of the above look rather foolish. It also could merely be the beginning.