It’s not that unusual for a public figure to go from hero to villain. But going from villainy to heroism? That’s a tougher road to traverse.

Julian Assange, the WikiLeaks founder and central figure, has managed to do both over the last few months, culminating in a remarkable embrace by the president-elect and two longtime critics on the American right, Sean Hannity and Sarah Palin. Over the same time, some of Assange’s erstwhile champions on the American left have drifted away, disillusioned by the way WikiLeaks attacked Hillary Clinton during the presidential election. Has Assange changed, or is his rehabilitation on the right, and his loss of esteem on the left, simply a factor of political exigencies within the United States? The answer is a little bit of both.

Six years ago, when WikiLeaks burst on the scene with its massive release of American documents, Donald Trump was livid. “I think it's disgraceful, I think there should be like death penalty or something,” the then-entertainer said in an exchange recently dug up by CNN’s KFile.

Fox News host Sean Hannity was also furious, demanding Assange be arrested: “Why can't Obama do something about the WikiLeaks?” Sarah Palin compared WikiLeaks to the al-Qaeda magazine Inspire and called Assange “an anti-American operative with blood on his hands.”

But Assange won some admirers on the American left, people who applauded his willingness to speak truth to power—for example, by exposing the brutality of the Iraq War, which they saw as a needless conflict launched by the Bush administration. Libertarians viewed his revelation of the inner workings of government as a valuable injection of transparency. Assange’s swashbuckling demeanor made him all the more alluring to all involved. Writing in The Atlantic, David Samuels argued that “not since President Richard Nixon directed his minions to go after Pentagon Papers leaker Daniel Ellsberg and New York Times reporter Neil Sheehan ... has a working journalist and his source been subjected to the kind of official intimidation and threats that have been directed at Assange and [Chelsea] Manning by high-ranking members of the Obama administration.”

Liberals fell out of love with Assange, as Hemingway probably never said, slowly and then all at once. Of course, many Democratic officeholders had never been fond of him—they viewed his actions, as their Republican colleagues did, as an act of piracy, a dangerous exposure of U.S. secrets and systems that struck at a Democratic president, Barack Obama, and his secretary of state, Hillary Clinton. (In retrospect, it seems Assange saw it that way, too.)

But Assange gradually managed to alienate many of his erstwhile allies. The rape allegations leveled against him in Sweden played a major role, and are the reason he remains holed up in the Ecuadorean embassy in London, for fear of arrest and extradition if he leaves. Assange’s general demeanor did a lot of work, too—a riveting essay by Andrew O’Hagan about his experience trying and failing to ghostwrite Assange’s book offers a useful portrait of a waspish, difficult man, wholly apart from his political convictions. The Associated Press reported in summer of 2016 that WikiLeaks had released, as part of larger dumps, “the personal information of hundreds of people—including sick children, rape victims and mental health patients.” Some of Assange’s old fans redirected their affections to Edward Snowden, who himself criticized Assange for refusing to curate the documents he released, incurring a stinging response from Wikileaks.

The dump of documents related to the Democratic National Committee in the summer of 2016 finished off the job for many observers, especially as the consensus grew that the cache of emails had probably been obtained by Russian state hackers and then passed to WikiLeaks. Even if that was not the case, it was very clear that Assange saw them as a way to hurt Clinton. She had been furious about the 2010 leaks, and he held her partly responsible for his current predicament. Clinton backers like Michael Moore and Bill Maher began to view Assange as an abettor, intentionally or not, of Trump.

The Trumpist swoon for Assange was more abrupt, corresponding to WikiLeaks dumping the Democratic documents during the summer of 2016. Hannity started having Assange on his show in the fall. “Part of me, in the beginning, was conflicted about you,” he told Assange in September, in what Matt Wilstein noted was an understatement. He was back on Hannity’s radio show in December. By the time he appeared this week on Hannity’s TV show, the host was gushing, “I believe every word he says, to be perfectly honest.” Hannity claims his change of heart came because WikiLeaks had gotten nothing wrong and gotten no one killed.

But the abrupt volte-face corresponds too neatly with Assange’s shift to aiding Trump, as well as his vocal insistence that WikiLeaks did not obtain its documents from Russia, which undermines any claims that the hacks were conducted by the Kremlin to hurt Clinton and help Trump—which would, of course, be damaging to Trump. If it seems too harsh to ascribe nakedly partisan motives to Hannity, keep in mind that he has happily declared himself “not a journalist.

Over the weekend, the president-elect promised a revelation about the hacks on Tuesday or Wednesday, and that time came and went without any news—though on Hannity’s program, Assange repeated what he has said before, which is that Russia was not WikiLeaks’ source. Nonetheless, Trump tweeted in praise of the interview, only to complain the next day that “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”— as though he were a simple news aggregator, rather than the president-elect of the United States approvingly quoting Assange.

Many elected Republicans, as well as conservative pundits, however, remain just as negative on Assange as ever. On Thursday, Senator Ted Cruz said, “I think Assange has done enormous damage to our national security. I would not be praising him under any circumstances.”

One other peculiar political realignment that has emerged from the controversy over WikiLeaks is the sudden affection of Democrats for the intelligence community. The intelligence community has chafed at attempts at oversight, and when the Senate Intelligence Committee attempted to produce a report on torture committed by the CIA, the agency repeatedly tried to stymie its efforts. The CIA snooped on Senate staffers and attempted to get them criminally prosecuted, and Director John Brennan was eventually forced to apologize. During the Bush administration, Democrats assailed the intelligence community for suggestions that Iraq possessed weapons of mass destruction. Yet on Thursday, a succession of Democratic senators lined up to voice their support and praise for intelligence agents being attacked by Trump. Nor is this a phenomenon limited to elected officials—an NBC News poll finds that the CIA’s net favorability among Democrats has risen from -4 percent two years to 32 percent today.

Assange, in the midst of this maelstrom, has not been as unchanging as he might like to imagine himself. Critics have accused him of coziness with the Kremlin, even aside from the question of where WikiLeaks obtained the DNC emails. To assert that Assange is pro-Putin would overstate the evidence, but he has appeared to pull some of his punches with regards to Russia.

In a December interview, Assange told La Repubblica that WikiLeaks had not focused on Russia for two reasons. First, he said there was a vibrant press in Russia—though the idea that Russia’s press is more free than the American press might trigger guffaws. He also said WikiLeaks was a predominantly English-language organization, making it much more focused on the Anglophone world. “No WikiLeaks staff speak Russian, so for a strong culture which has its own language, you have to be seen as a local player,” Assange said. (WikiLeaks has published documents in other languages, including the cache from the Saudi Foreign Ministry.)

But a television show Assange produced appeared for a time on RT, a government-owned cable channel in Russia. Huffington Post reported that although WikiLeaks promised a major Russia dump in 2010, that never materialized. And despite his spat with Snowden, in which Assange espoused total transparency, WikiLeaks criticized the release of the Panama Papers as a U.S. government ploy to undermine Putin.

In other words, Assange was arguing that it was the motivations for a leak, rather than the material, that mattered. This is ironic, since many of those observing Assange, both his critics-turned-fans and his fans-turned-critics, seem to have become fixated on his motivations at the expense of the information he releases, which has tended to be of high quality and interest, regardless of the targets. If that irony was lost on Assange, it’s a sign that he is no more immune to politics than any of the rest of them.