Donald Trump’s national security team is discussing plans to dismantle the Office of the Director of National Intelligence, the organization that was created in response to the 9/11 attacks, according to an adviser to the president-elect and a former senior intelligence official. The news comes as the current director of national intelligence, James Clapper, announced his resignation Thursday.

The Trump national security team has been meeting in recent days, planning the removal of the cabinet-level position and assessing how to fold parts of the organization into the 16 federal intelligence agencies it oversees, according to both people with knowledge of the plans. If the restructuring is accomplished, it would undo legislation passed by Congress in 2004, dismantle the biggest American intelligence bureaucracy created since the end of World War II, and roll back a key recommendation of the 9/11 Commission.

The national security team believes the effort will be “long and messy” but is confident it will be successful, according to the former senior U.S. intelligence official who is consulting with those involved in the transition.

Both sources asked for anonymity because they are not authorized to speak publicly about confidential plans.

The former senior intelligence official, who supports the proposal, said the DNI was never a solution to the 9/11 attacks. “It was always a naive idea that American intelligence can be ‘fixed.’ You’ll never get it all correct,” the former official said. “You can never have 100 percent intelligence, never stop every terror plot or penetrate every terrorist cell. There will always be gaps.”

The Office of the Director of National Intelligence declined to comment, but a source close to Clapper said the director was not aware of the Trump transition team’s plans.

The Trump team sees removing the office as an opportunity to reorganize other parts of the intelligence community, something that some career officials have long sought. The transition team, for example, is also contemplating reversing the recent restructuring of the CIA that took place under its current director, John O. Brennan. “Assuming the DNI gets taken apart, they want to undo Brennan’s reorganization of the agency,” the former senior official said.

Last year, Brennan restructured the CIA by removing the wall between analysts and spies, putting them together in mission centers, rather than geographic divisions, as had been the organization since the agency was created. The new structure was largely modeled after the Counterterrorism Center, which had become the agency’s dominant section after 9/11. Critics from inside the agency complained that it weakened the core skill of the agency — human espionage — and removed expertise. Brennan said the move allowed the agency to better reflect the changing landscape of global threats, including cyberspace.

The Trump transition team announced Friday morning that Mike Pompeo, a Republican representative from Kansas, will be nominated to head the CIA. It’s unclear whether Pompeo, a former Army officer, would support reversing Brennan’s reforms, or whether it was a condition of accepting the nomination.

More than a decade ago, a combination of executive orders signed by President George W. Bush and congressional legislation led to the new cabinet-level position. The office, which launched in 2005, was designed to fill gaps that contributed to the September 11, 2001, terrorist attacks by facilitating information sharing among the 16 federal agencies that make up the intelligence community. The director of the Central Intelligence Agency had previously served as the president’s cabinet-level position overseeing intelligence.

Even before the director of national intelligence was established, critics griped about the new bureaucracy. The chief complaint was that while the new position would have budgetary control over the 16 agencies it oversaw, it would have no hiring or firing authority at any individual agency, limiting its ability to actually control personnel decisions or effect espionage operations.

The office lacked direct authority over employees at other agencies, but its own workforce grew to 1,750 employees by 2008.

In his memoir, “Playing to the Edge,” Gen. Michael Hayden, former director of the NSA and CIA, recalls the skepticism the intelligence community had at the time for what many felt would be an unnecessary bureaucratic intrusion. “There were few in the intelligence community at the time who thought that restructuring was a good idea,” he wrote. “I certainly did not.”

By the time the office got up and running, Hayden decided that it could work, but only if the right people were in charge.” Good people overcome imperfect structures,” he concluded.

While complaints about the new position eventually subsided, tensions continued between the new office and those under its authority. During the first year of President Barack Obama’s administration, retired Adm. Dennis Blair, the third director of national intelligence, sought to place the office’s employees in embassies overseas and supersede the authority of the CIA’s station chief. Blair’s effort, which received considerable pushback from then CIA Director Leon Panetta, ultimately led to Blair’s dismissal, and the plan was never implemented.

Blair, who now serves as chairman and CEO of Sasakawa Peace Foundation USA, said that getting rid of the director of national intelligence would be a mistake. “Elimination of the DNI position would be a major setback for the kind of integrated intelligence that the U.S. will need in the future,” Blair told The Intercept. “Despite the advances made since 9/11, there is still a need for a powerful organization to bring together the individually skilled, but often disjointed efforts of the separate intelligence organizations.”

David Priess, author of “The President’s Book of Secrets” and a former intelligence officer, said that concerns about the office and the size of its bureaucracy are not new, but that actually eliminating it would be a difficult undertaking for a new administration. “The office of the DNI is not like so many other things that they’ve talked about reversing and overturning,” he said in a phone interview. “It’s a law, not an executive order at the whim of the president; it was part of the Intelligence Reform and Terrorism Prevention Act; [they] can’t unilaterally decide it no longer exists, they would have to pass a new law unwrapping all the things in that law.”

The Trump transition team did not immediately respond to a request for comment.