One of the thorniest questions facing the incoming Trump administration is what to do about America’s increasingly dysfunctional intelligence community, known collectively by its acronym, the IC. Made up of no fewer than 16 different agencies, the IC includes marquee services like the CIA and the National Security Agency, as well as more obscure spook fiefdoms such as Defense Intelligence Agency (serving the military) and the National Reconnaissance Office, which monitors America’s national-security concerns via satellites.

In the aftermath of Sept. 11., George W. Bush hastily reorganized the IC, creating the elephantine Department of Homeland Security to absorb some agencies, demoting the Director of Central Intelligence (formerly the nation’s top spy) to a subaltern and placing the entire IC under the aegis of a new Director of National Intelligence, who reports directly to the president.

Result: more bureaucrats, more staffers, more buildings — but little if any improvement in national security. Indeed, you can argue we’re worse off today than we were 15 years ago.

Muslim terrorists run rampant at home. Abroad, the Russian bear hungrily eyes the Baltics and would love to snack again on Ukraine. In the Far East, China contests what’s left of the US Navy for control of the South China Sea, while an increasingly bellicose North Korea lobs missiles over Japan. And in Iran, the mullahs work on their bomb.

Trump’s first order of business, therefore, is to take control, firmly, by dissolving Homeland Security and cashiering the DNI, a jolly figure of comic relief named James Clapper. Another firing that would do wonders for morale is the prompt sacking of CIA Director John Brennan, widely derided as a careerist, yes-man and Islamophile.

Trump might consider splitting the agency, separating its intelligence-gathering arm (the spies) from its analytical operations. The Agency’s great weakness has long been falling in love with both its own expertise and with the nation’s adversaries — which is why it’s failed to predict everything from the fall of the shah to the collapse of the Soviet Union. If stability is your goal, it’s easy to see no evil.

As the Clinton e-mails fiasco has shown, the FBI needs to be removed from the Justice Department and de-politicized. These days, its work is more about stopping terrorists than chasing bank robbers in Omaha, so its relationship to the CIA perhaps ought to be more like the UK secret services, MI5 (domestic) and MI6 (foreign), working together instead of antagonistically.

The lesser agencies, split among Defense, Treasury, DHS, State and the Energy departments could use consolidation and streamlining, so they better serve the current, overriding national purpose of defeating Islamic terrorism, and not the interests of their parent agencies.

In short, what we need is a leaner IC, relieved from political pressure and acting in concert for the preservation of the nation.

Michael Walsh is an author, screenwriter and contributing editor at PJ Media. His most recent book is “The Devil’s Pleasure Palace.”