The search is on for a replacement for Adm. Mike Rogers, the head of the National Security Agency and the last Obama intelligence appointee remaining in the Trump administration. Rogers is expected to retire this spring after an eventful – and often controversial – four years.

When Rogers does step down, his four-year tenure at the secretive organization will be remembered in part for having been bookended by two major spy scandals. He came to the agency in 2014 in the wake of the Edward Snowden leaks, which exposed some of the agency’s most sensitive spying tools. And he will leave as the NSA continues to struggle with the posting of many of its top-secret hacking tools by a mysterious group known as the Shadow Brokers.

Several NSA contractors have been arrested in recent months, but there is no indication that they are part of the group or that those ultimately responsible have been identified.

Due to the leaks, an unpopular reorganization aimed at combining the offensive and defensive sides of the cyber operation to become more efficient, and vastly higher salaries in the commercial sector, the NSA has been losing top latent over the past several years – a worrisome trend that Rogers has struggled with, while insisting that the losses aren’t a problem.

Combining the offensive and defensive cyber operations was part of a project dubbed “NSA 21,” which was meant to break down what Rogers called the “walls of granite” among divisions. But the project has also rankled some long-time staffers.

At a security conference in September, Rogers went out of his way to praise the men and women who work for him, saying interacting with “the great men and women of the organization” is “the best part of the day for me.” But he added, “if the price of security becomes that we drive away the very men and women that generate value in the first place, we now have a self-induced mission kill.”

Part of the challenge for Rogers and his successor will be the split of the NSA and the military’s U.S. Cyber Command, which is set to become a “unified combatant command” with about 6,200 staffers by the end of the current Fiscal Year 2018.

Rogers has been instrumental in building up the capacity and capabilities of Cyber Command, analysts have said.

Given the nature of the job that oversees 21,000 analysts, hackers, and staffers soaking up intelligence from multiple sources across the globe, it is unsurprising that Rogers at times found himself at odds with both the Obama and Trump administrations.

The fact that Rogers managed to make it to 2018 at the helm of the NSA is somewhat remarkable, in fact. In October 2016 – just weeks before Donald Trump won the presidency – Obama’s Defense Secretary Ash Carter and Director of National Intelligence James Clapper moved to oust Rogers over concerns with his leadership and Clapper’s view that the NSA should be led by a civilian.

Just days after Trump won the election, Rogers again courted controversy by visiting Trump Tower to meet with the president-elect – but without notifying his superiors, according to reports at the time.

More recently, reports surfaced that he declined suggestions from President Trump to state publicly that there was no collusion between his presidential campaign and Russia. In a June hearing before the U.S. Senate, Rogers demurred when asked about the episode. He did say, however, that if asked to testify by Robert Mueller, who is heading up the investigation into Russian interference in the election, he would would accept.

It is unclear if President Trump will continue the tradition of appointing an active-duty military officer to the position of NSA chief, but the front-runner appears to be Army Lt. Gen. Paul Nakasone, who took the reigns at Army Cyber Command in 2016, according to reports.

While Nakasone would be subject to Senate approval, a process which would likely take several months, his confirmation would place a military officer with a long history in cyber and intelligence work in the position. The Army general, who is 54, carries a solid reputation within both the cybersecurity and military community, and he played a key role in kicking off the cyber war against the Islamic State in Iraq and Syria.