Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

President-elect Donald Trump has spent the weeks since the election openly questioning the Central Intelligence Agency’s assessments about Russian interference in the fall contest, prompting his foes to laud the apolitical and fundamentally patriotic mission of America’s intelligence officers.

But as with so many other U.S. institutions, public perceptions of the intelligence community have a whole lot to do with politics.

While the CIA still remains relatively popular — much more so than Congress or either political party — the past two decades have shown significant fluctuation in how Republicans and Democrats view the agency, according to polling conducted by NBC News and the Wall Street Journal.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

And for the first time since the survey asked about the CIA back in 2002, Democrats now have a more positive view of the nation’s foreign intelligence agency than Republicans do.

In the wake of Trump’s unvarnished skepticism about the CIA's assessment that Russia did act to influence the outcome of the election in his favor, a December NBC/WSJ poll showed that 29 percent of Republicans view the CIA positively, compared to 24 percent who view it negatively (Net favorability of +4 percent.) But for Democrats, it was 46 percent positive, 14 percent negative (Net favorability of +32 percent).

Among voters who supported Trump and campaign foe Hillary Clinton, the difference was even more stark, with Clinton voters registering a net +39 percent favorability for the agency, while Trump voters gave it a net rating of just +2 percent.

That’s a particularly significant reversal for a party that has typically led the charge against intelligence agency overreach. In 1975, for example, a special Senate panel led by Democrat Frank Church investigated the CIA and other intelligence agencies, probing the legality of assassination attempts of foreign leaders, domestic surveillance practices and the monitoring of political activities by American citizens.

Democratic suspicion of the CIA persisted into the run-up to the Iraq War and particularly its aftermath, when Republicans gave the agency relatively high marks even as Democrats railed against its harsh interrogation practices, domestic wiretapping and intelligence failures. In 2006, Republicans’ net positive views of the CIA were a whopping 70 points higher than those of Democrats.

After the successful operation to kill 9/11 mastermind Osama bin Laden in 2011, views of the CIA soared among both parties, offering a rare moment of partisan agreement about the merits of the organization.

But by 2014, a divide again persisted, with Democrats giving the agency a characteristic thumbs down again.