Andrew McCabe, the onetime FBI deputy director long scorned by President Donald Trump and just fired by the attorney general, kept personal memos describing interactions with the president that have been provided to the special counsel's office, and are similar to the notes compiled by dismissed FBI chief James Comey, according to The Associated Press.

The memos could factor into special counsel Robert Mueller's investigation as his team examines Trump campaign ties to Russia and possible obstruction of justice.

McCabe's memos include details of interactions with the president, among other topics, according to a person with direct knowledge of the situation who wasn't authorized to discuss the notes publicly and spoke on condition of anonymity.

Though the precise contents are unknown, the memos possibly could help substantiate McCabe's assertion that he was unfairly maligned by a White House he says had declared "war" on the FBI and Mueller's investigation.

The disclosure Saturday came hours after Trump called McCabe's firing by Attorney General Jeff Sessions "a great day for democracy."

Andrew McCabe FIRED, a great day for the hard working men and women of the FBI - A great day for Democracy. Sanctimonious James Comey was his boss and made McCabe look like a choirboy. He knew all about the lies and corruption going on at the highest levels of the FBI! —@realDonaldTrump

That sent former CIA director John Brennan, an outspoken Trump critic, into a Twitter tizzy.

When the full extent of your venality, moral turpitude, and political corruption becomes known, you will take your rightful place as a disgraced demagogue in the dustbin of history. You may scapegoat Andy McCabe, but you will not destroy America...America will triumph over you. <a href="https://t.co/uKppoDbduj">https://t.co/uKppoDbduj</a> —@JohnBrennan

Sessions said he acted on the recommendation of FBI disciplinary officials who said McCabe had not been candid with a watchdog office investigation. McCabe was fired two days before his retirement date.

An upcoming inspector general's report is expected to conclude that McCabe had authorized the release of information to the media and was not forthcoming with the watchdog office as it examined the bureau's handling of the Hillary Clinton email investigation. McCabe denied the allegations and said his credibility had been attacked as "part of a larger effort not just to slander me personally," but also the FBI and law enforcement.

McCabe, right, is seen with Attorney General Jeff Sessions, centre, and Deputy Attorney General Rod Rosenstein in July 2017. (Andrew Harnik/Associated Press) "It is part of this administration's ongoing war on the FBI and the efforts of the special counsel investigation, which continue to this day," he added. "Their persistence in this campaign only highlights the importance of the special counsel's work."

The firing set off duelling tweets between Trump, who called the termination a "great day for the hard-working men and women of the FBI," and Comey, the director he fired 10 months ago.

Trump called Comey "sanctimonious" and said Comey made McCabe "look like a choirboy." Comey, whose highly anticipated book comes out next month, responded with his own tweet: "Mr. President, the American people will hear my story very soon. And they can judge for themselves who is honourable and who is not."

Trump lawyer calls for end to Russia probe

Also Saturday, Trump's personal lawyer, John Dowd, cited the "brilliant and courageous example" by Sessions and the FBI's Office of Professional Responsibility, and said Deputy Attorney General Rod Rosenstein should "bring an end" to the Russia investigation "manufactured" by Comey.

Dowd told the AP that he neither was calling on Rosenstein, who oversees Mueller's inquiry, to fire the special counsel immediately nor had discussed with Rosenstein the idea of dismissing Mueller or ending the probe.

Trump also denied again, in a tweet, that there was any collusion between the Trump campaign and Russia.

As the House Intelligence Committee has concluded, there was no collusion between Russia and the Trump Campaign. As many are now finding out, however, there was tremendous leaking, lying and corruption at the highest levels of the FBI, Justice & State. <a href="https://twitter.com/hashtag/DrainTheSwamp?src=hash&ref_src=twsrc%5Etfw">#DrainTheSwamp</a> —@realDonaldTrump

Mueller is investigating whether Trump's actions, including Comey's ouster, constitute obstruction of justice. McCabe could be an important witness, and his memos could be used by investigators as they look into whether Trump sought to thwart the FBI probe. Comey's own memos have been turned over to Mueller and are part of his investigation.

McCabe, in a statement defending himself, asserted he was singled out by the administration because of the "role I played, the actions I took, and the events I witnessed in the aftermath" of Comey's firing last May.

McCabe became acting director after that and assumed direct oversight of the FBI's investigation into the Trump campaign. He said the release of the findings against him was accelerated after he told congressional officials that he could corroborate Comey's accounts of Comey's conversations with the president.

McCabe had been on leave from the FBI since January, when he abruptly left the deputy director position. He had planned to retire on Sunday, and the dismissal probably jeopardizes his ability to collect his full pension benefits. His removal could add to the turmoil that has enveloped the FBI since Comey's firing and as the bureau moves ahead with an investigation the White House has dismissed as a hoax.

McCabe accused of being biased

McCabe spent more than 20 years as a career FBI official and played key roles in some of the most recent significant investigations. But Trump repeatedly condemned him over the past year as emblematic of an FBI leadership he contends is biased against his administration.

The firing arises from an inspector general review into how the FBI handled the Clinton email investigation. That inquiry focused not only on specific decisions made by FBI leadership, but also on media leaks.

McCabe came under scrutiny over an October 2016 news report that revealed differing approaches within the FBI and Justice Department over how aggressively the Clinton Foundation should be investigated. The watchdog office has concluded that McCabe authorized FBI officials to speak to a Wall Street Journal reporter for that story and that McCabe had not been forthcoming with investigators. McCabe denies it.

McCabe became entangled in presidential politics in 2016 when it was revealed that his wife, during her unsuccessful run for state Senate in Virginia, received campaign contributions from the political action committee of then Gov. Terry McAuliffe, a Virginia Democrat and longtime Clinton friend. The FBI has said McCabe received the necessary ethics approval about his wife's candidacy, and was not supervising the Clinton investigation at the time.