WASHINGTON – The FBI's top lawyer, James Baker, is being reassigned – one of the first moves by new director Christopher Wray to assemble his own team of senior advisers as he tries to fend off accusations of politicization within the bureau.

Baker told colleagues he will be taking on other duties at the FBI, according to people familiar with the matter. In recent months, Baker had been caught up in a strange interagency dispute that led to a leak probe which attracted the attention of senior lawmakers, but people familiar with the matter said that probe had recently ended with a decision not to charge anyone. The leak issue had not played a part in Baker's reassignment, these people said.

Baker, one of the most trusted, longest-serving national security officials in the government, has served as the head of the FBI's Office of General Counsel for several years, playing a key role in the agency's handling of major cases and policy debates, including the FBI's unsuccessful battle with Apple Inc. over the growing use of encryption in cell phones.

Baker informed some colleagues in an email Wednesday that his duties were changing at the FBI, according to people familiar with the matter. Two people familiar with the matter said he is being "reassigned" by Wray, but they cautioned that the change does not take effect immediately and such a move is a normal part of a new director taking charge at the bureau – not a reflection of the political controversies buffeting the FBI.

In recent days, conservatives have intensified their calls for a housecleaning of some kind at the senior levels of the FBI. Since Wray became director in August, Baker has told colleagues he expected the new boss would eventually pick someone new for his position.

He was very close to former FBI Director James Comey, who asked Baker to be his general counsel. They were colleagues at the Justice Department and when they were out of government at Bridgewater Associates, an investment management firm.

Baker declined to comment, as did an FBI spokesman.

For months, Baker had become caught up in what some law enforcement officials considered a particularly frustrating probe of a leak involving the FBI, the National Security Agency, and stories that appeared about a year ago involving surveillance techniques for a particular email provider, according to people familiar with the matter.

"Jim was distressed about it but was confident he hadn't leaked anything" and would be cleared, said one U.S. official.

A respected veteran prosecutor was assigned to the case, but people close to the matter said the investigation had petered out recently and charges were not expected to be filed.

The leak probe frustrated some law enforcement officials because it was viewed internally as an instance where officials found themselves caught up in an internal inquiry only because they had tried to prevent misinformation about surveillance capabilities from spreading far and wide among the public and lawmakers. Others said the very existence of the investigation was mostly due to a disagreement between two agencies, according to people familiar with the matter.

Since taking office, President Trump has repeatedly demanded that the Justice Department and FBI more aggressively pursue leak investigations, and congressional Republicans have echoed much of that criticism. Last week, House Judiciary Committee Chairman Bob Goodlatte (R., Va.) singled out Baker, noting he was the subject of a leak investigation, though by that time, the probe was effectively over.