President Donald Trump denied on Thursday that he fired former FBI director James Comey in May 2017 because of the probe into Russian meddling in the 2016 presidential election, despite previously saying that he had the investigation in mind while considering whether to fire Comey.

>> Read more trending news

“Not that it matters but I never fired James Comey because of Russia!” Trump wrote Thursday morning in a tweet. “The Corrupt Mainstream Media loves to keep pushing that narrative, but they know it is not true!”

The president has denied multiple times that he fired Comey over the Russia investigation, however, he told NBC News in 2017 that he was thinking about "this Russia thing" when he came to his decision.

“When I decided to do it, I said to myself, I said, ‘You know, this Russia thing with Trump and Russia is a made up story,” he said. “It’s an excuse by the Democrats for having lost an election that they should have won.”

Comey was fired on May 9, 2017, four years into his role as FBI director. President Barack Obama had appointed him in September 2013 to serve as the nation’s top cop.

White House officials have said the termination was prompted by Comey’s handling of the investigation into former Secretary of State Hillary Clinton’s use of a private email server during her time in office.