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

WASHINGTON — President Donald Trump hates intelligence leaks — except when he doesn't.

On Tuesday morning, Trump retweeted a Fox News report about U.S. spy satellites detecting North Korean missile movements. The report was based on anonymous sources discussing leaked classified information — a practice Trump has decried repeatedly when articles are based on leaks that are damaging to his White House.

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

Here's what the president retweeted:

U.S. spy satellites detect North Korea moving anti-ship cruise missiles to patrol boat https://t.co/BPFXsLffgy — FOX & friends (@foxandfriends) August 8, 2017

Asked about the report Tuesday morning on Fox, Nikki Haley, the U.S. ambassador to the United Nations, said she couldn't comment on classified information, but said, "if that's in the newspaper, that's a shame."

The president's action came just days after Attorney General Jeff Sessions and Director of National Intelligence Dan Coats announced stepped-up efforts against government leaks, which Sessions said were undermining "the ability of our government to protect this country."

"I have this warning for would-be leakers: Don't do it!" Sessions said on Friday.

The Fox report that was retweeted by the president to his more than 35 million Twitter followers included quotations from officials who requested anonymity to discuss sensitive information. Trump has derided news organizations for using anonymous sources, saying those sources don't exist and even proposing that the use of such sources be barred.

"They shouldn't be allowed to use sources unless they use somebody's name," the president said during a speech in February to the Conservative Political Action Conference. "Let their name be put out there."

Rep. Adam Schiff, the top Democrat on the House Intelligence Committee, tweeted that Trump "must stop" his own penchant for sharing sensitive information. In May, it was reported that the president revealed highly classified intelligence information to Russian officials during a meeting at the White House.