By Seán D. NaylorSeán D. Naylor is the intelligence and counterterrorism senior staff writer for Foreign Policy. He previously spent 23 years at Army Times, where his principal beat was special operations forces. He is the author of Not A Good Day To Die – The Untold Story of Operation Anaconda and the forthcoming Relentless Strike – The Secret History of Joint Special Operations Command.

The U.S. intelligence community first learned that Yemen’s Houthi rebels had launched a Scud missile toward Saudi Arabia on June 30 not from spies on the ground or satellites in the skies, but instead from a more modern form of information gathering: Twitter.

“The first warning of that event: ‘hashtag scudlaunch,’” Marine Lt. Gen. Vincent Stewart, the head of the Pentagon’s Defense Intelligence Agency (DIA), said at a gathering of intelligence contractors just outside Washington on Thursday night. “Someone tweeted that a Scud had been launched, and that’s how we started to search for this activity.”

The increasing prevalence of smartphones and social media is reshaping the Middle East in ways that are impossible to anticipate, Stewart said.

“Ten years or so ago, if a Tunisian had set himself on fire in Tunisia, it would have been an interesting local story,” Stewart said in reference to Mohamed Bouazizi, whose act of self-immolation in December 2010 is widely credited with sparking the Arab Spring movement. “But the advent of smartphones and Facebook and social media [means] someone captures that image, in milliseconds it’s global, and kicks off a revolution.”

The ramifications of that revolution formed the basis of a brief rhetorical tour through the Middle East that Stewart gave his listeners. His was the voice neither of optimism nor of confidence that the future is in any way predictable. “You see nation-states collapsing in the region and maybe going to ethnic lines, and none of us understand where that will lead five minutes from now, five years from now,” he said.

Iraq “may indeed be irreparably fractured and may not come back as an intact state,” he said. Current U.S. policy, which is to treat Iraq as a unitary state and avoid formal diplomatic recognition of de facto separate entities such as the Kurdistan Regional Government in northern Iraq, would have to change if that occurred.

The United States already enjoys close military relations with Iraq’s Kurds in particular, but the division of Iraq into a Kurdish state, a Shiite state, and a Sunni state could force the United States to choose between its Kurdish allies and Turkey, a NATO partner that has long opposed Kurdish independence. Stewart noted that his remarks had been written “a couple of weeks ago” — in other words, before Turkey announced it was entering the war against the Islamic State, only to begin pummeling Kurdish separatists — but acknowledged that Washington could find itself in a tricky situation if Turkey were to invoke NATO’s collective-defense provisions after an attack from a Kurdish-held area.

Iraq is not the only country whose very existence is threatened by the forces roiling the Middle East, according to Stewart. “You see a lot of fracturing in Syria, where you could end up with an Alawite-stan in the middle and something to the north and something to the south,” Stewart said in reference to the Alawite religious minority to which Syrian President Bashar al-Assad belongs and which forms the core of his regime.

The DIA director also expressed concern about Jordan, a close ally of the United States that has absorbed more than 600,000 Syrian refugees. “Jordan has got more West Bankers and Syrians in Jordan than they actually have Jordanians,” he said, adding that he believes Amman is “closer in its thought process and closer in its relationship with Israel than it is with any of the Gulf states. I don’t know if we would have said that 15 or 20 years ago.”

He said he recently invited Egyptian and Jordanian representatives to his home. “Almost in unison they said, ‘Israel’s got to be there.’”

Of course, the challenges facing the intelligence community are not limited to those in the Middle East. “I haven’t talked about the crazy in North Korea,” Stewart said, in apparent reference to North Korean dictator Kim Jong Un, before moving on to Vladimir Putin’s increasingly aggressive Russia. “Remember when Russia was going to be our friend?” he asked rhetorically. “It seems like a long time ago.”

For the first time, the DIA director also specified the number of operatives in his agency’s Defense Clandestine Service, which ran into problems with Congress and other critics who thought it too closely resembled the CIA’s spy corps, which until recently was called the National Clandestine Service (NCS). While the initial goal for the program was 1,000 operatives, Congress asked hard questions about the initiative before scaling back that number to 500. Stewart said he is looking to “stabilize” the total at “probably something less than 500.”

“It got a lot of friction because folks believed it was duplicative to what NCS did, but the reality is I can’t get NCS to focus on things that are important to the defense intelligence community,” Stewart said. “I can’t get them to focus on weapons systems, weapons technology, military capability, which is the sweet spot of what I need to do to support our operational commanders, so we needed our own focused defense humint [capability] to go after those target sets.”