FBI Deputy Director Andrew McCabe is leaving his position ahead of a previously planned retirement this spring.

McCabe has been a frequent target of criticism from President Donald Trump, who has looked to discredit investigations looking into contacts, and possible collusion, between members of his campaign and transition teams and Russia.

Two people familiar with the McCabe decision described it to The Associated Press on Monday. They spoke on condition of anonymity, because they were not authorized to speak on the record.

The move is effective Monday. McCabe had already been planning to retire upon his eligibility in a matter of weeks.

It wasn’t clear whether his early departure is for personal reasons or a reflection of the criticism.

Trump has lashed out at McCabe, among others, in a series of tweets over the past months. The president has tried to taint McCabe due to his association with former colleague James Comey, the former FBI director who Trump fired and then accused of lying in testimony on Capitol Hill.

Trump has also highlighted McCabe’s wife’s bid for a State Senate seat in 2013, during which she received donations from prominent Democrats.

McCabe served acting director of the FBI after Comey left, with the director position eventually filled by Christopher Wray.

Comey’s departure helped pave the way for the appointment of special counsel Robert Mueller to look into potential election meddling, Russian collusion and any other wrongdoing uncovered in the probe.

Trump, as well as several Republicans in Congress, have seized upon texts sent by a former member of Mueller’s investigation team, Peter Strzok, to discredit the special counsel probe. This is despite the fact that the appointment of Mueller last year was met with bipartisan praise.

Trump has expressed frustration he can’t become personally involved in the workings of the FBI and the Justice Department, even though tradition has dictated that criminal inquiries launched by the federal government should operate free from the political influence of the White House.

“The saddest thing is that because I’m the president of the United States, I am not supposed to be involved with the Justice Department,” he told conservative radio host Larry O’Connor in a November interview.

“I’m not supposed to be involved with the FBI. I’m not supposed to be doing the kind of things that I would love to be doing,” he said.

Eric Holder, attorney general under Barack Obama, praised McCabe on Monday and blasted would he said were “bogus attacks on the FBI and DOJ.”

According to a biography on the FBI website, McCabe first joined the bureau in 1996. He was named deputy director on Feb. 1, 2016, after years spent in the agency’s counterterrorism and organized crime units.