Donald Trump on Tuesday defended his decision to share certain sensitive information with Russian officials in the Oval Office last week, undermining the credibility of his own staff, including Secretary of State Rex Tillerson and national security adviser H.R. McMaster, who just hours before had carefully denied such reports.

Trump tweeted that he had “the absolute right” to share information “pertaining to terrorism and airline flight safety” with Russia. He said he shared such information for “humanitarian reasons” and in order to force Russia to “greatly step up their efforts to fight ISIS and terrorism.”

On Monday the Washington Post reported that Trump divulged classified details about an ISIS terrorist plot involving laptops on airplanes during a meeting with Russian Foreign Minister Sergei Lavrov and Russian Ambassador Sergei Kislyak. The information had been shared with the U.S. intelligence community by an ally on the basis that it was not shared with others. The Post said Trump also revealed the city within Islamic State group territory where the ally found out about the threat — prompting some to suggest that the informant’s life had been put in danger.

The report was subsequently confirmed by the New York Times, The Wall Street Journal, Reuters, and BuzzFeed. While the disclosures have shocked many and raised serious concerns about intel-sharing arrangements, technically Trump has done nothing illegal, as the president has broad constitutional powers allowing him to declassify information at will.

Trump’s tweets seem to counter the message White House officials had been giving reporters just hours earlier. National security adviser H.R. McMaster, who was in the room during the meeting, said late on Monday: “The story that came out tonight, as reported, is false.”

Secretary of State Tillerson, also present at the meeting, offered a carefully crafted response similar to McMaster’s, acknowledging that Trump discussed a “broad range of subjects” with the Russian foreign minister and ambassador: “During that exchange, the nature of specific threats were discussed, but they did not discuss sources, methods or military operations.” As many have pointed out, the Post’s report never accused Trump of discussing sources, methods or military operations.

Finally, Dina Powell, deputy national security adviser and another person at the meeting, denied the reports. “This story is false. The president only discussed the common threats that both countries faced.”

Russia’s foreign ministry told the state news agency Interfax that the reports were “fake” while Maria Zakharova, a spokeswoman for the Russian Foreign Ministry called the reports dangerous and harmful.