The Pentagon general counsel has named a White House official and former GOP political operative to be the top lawyer at the National Security Agency, the U.S. government’s largest and most technically advanced spy agency, U.S. officials said.

The selection of Michael Ellis, which has not yet been announced, was made Monday, said officials, speaking on the condition of anonymity because they were not authorized to speak publicly. The appointment was made under pressure from the White House, said a person familiar with the matter.

The NSA declined to comment. The Pentagon and White House did not respond to a request for comment.

Ellis, who was chief counsel to Rep. Devin Nunes (R-Calif.), a staunch supporter of President Trump and then-chairman of the House Intelligence Committee, has been at the White House since early 2017, when he became a lawyer on the National Security Council and then this year was elevated to senior director for intelligence.

In March 2017, he gained publicity for his involvement in a questionable episode involving Nunes, who was given access at the White House to intelligence files that Nunes believed would buttress his baseless claims of the Obama administration spying on Trump Tower.

News reports stated that Ellis was among the White House officials who helped Nunes see the documents — reportedly late at night, earning the episode the nickname “the midnight run.

Ellis also has figured in the controversy over Trump’s effort last year to pressure Ukraine’s president to undertake what a whistleblower said was a politically motivated investigation of Joe Biden and his son Hunter.

According to testimony from another NSC official, Lt. Col. Alexander Vindman, whom Trump fired earlier this year, it was Ellis who first proposed moving a memorandum of Trump’s call with the Ukrainian president to a highly classified server.

The job of NSA general counsel is highly demanding, requiring candidates to have broad professional legal experience, an authoritative knowledge of statutes and executive branch regulations, and an ability to lead a legal office of about 100 lawyers for a sprawling agency — the equivalent of the legal shop for a multibillion-dollar global corporation.

NSA Director Paul Nakasone was not in favor of Ellis’s selection, according to three people familiar with the matter. However, the selection was not up to him, they said.

Ellis, if he passes the background and security clearance checks, would be succeeding Glenn Gerstell, who was general counsel from 2015 through January of this year. Gerstell practiced law for nearly 40 years at an international law firm, Milbank LLP, where he had been managing partner of the firm’s Washington office and led its Singapore and Hong Kong offices.

Gerstell declined to comment on Ellis’s selection. But, he noted, the agency and its legal office have “a deep tradition of being nonpartisan and it would be important for anybody in the position of general counsel to discharge the job that way.”

Ellis graduated from Yale Law School in 2011 and clerked for Judge Jeffrey Sutton of the U.S. Court of Appeals for the 6th Circuit and Judge Amul Thapar of the U.S. District Court for the Eastern District of Kentucky.

As general counsel, he will no longer be a presidential appointee, but a senior civil servant with civil service protections. A future Pentagon general counsel could choose to assign him to a different civil service position.

Ellis was selected over two other finalists: acting NSA general counsel Teisha Anthony and Bradley Brooker, acting general counsel at the Office of the Director of National Intelligence. Both are career civil servants.

Greg Miller contributed to this report.