Today marks the 20th anniversary of The Battle of Mogadishu, the American operation in Somalia later immortalized by Mark Bowden’s seminal non-fiction book “Black Hawk Down” and dramatized in Ridley Scott’s exhilarating but slightly less non-fictional movie of the same name. On October 3, 1993, 160 U.S. Army Rangers and other special operations forces launched what was supposed to be a routine raid to capture two lieutenants of Somali warlord Mohammed Farah Aideed. But when two MH-60L helicopters providing fire support were shot down, the operation became a desperate search and rescue mission in which U.S. forces were besieged overnight by thousands of heavily armed Somali militiamen. Fourteen hours after the operation’s start, eighteen Americans were dead, 84 were wounded, and one pilot was missing.

The incredible valor and drama of Task Force Ranger’s ordeal over those two days has, unfortunately, tended to draw attention away from the broader campaign to capture Aideed, whom U.S. and international forces had been hunting since the previous June, when Aideed’s Somali National Alliance ambushed and mutilated 24 Pakistani peacekeepers . This manhunt was part of a broader operation which – along with the “Black Hawk Down” battle itself – carries important tactical, operational, and strategic lessons. As debates rage about intervention in Syria and the renewed threat posed by Somali-based al-Shabaab, the 20th anniversary of the most dramatic U.S. military operation between Vietnam and Afghanistan offers an important opportunity to revisit those lessons, which remain relevant two decades later.

Lesson One: Technology Does Not Guarantee Success

Task Force Ranger enjoyed access to the full range of U.S. intelligence capabilities and assets. The Centra Spike signals-intelligence team was pulled off the hunt for Colombian drug lord Pablo Escobar in order to assist the search for Aideed. Theater and joint task force imagery assets included:

The Navy’s tactical airborne reconnaissance pod system slung under low-flying jet aircraft;

A specially modified Navy P3 Orion patrol plan;

A single-engine, super-quiet airplane with a real-time downlink to the Task Force headquarters;

The Pioneer unmanned aerial vehicle with a downlink to the Joint Operations Center (JOC); and

The Night Hawk ground FLIR (Forward-Looking InfraRed sensor) system.

Yet these highly sophisticated technological assets were ultimately ineffective because they could not pick up the lower-level technology used by the Somalis. Aideed communicated with his militia with couriers and dated walkie-talkies too low-powered to be detected by America’s sophisticated electronic eavesdropping equipment. In other words, when combined with U.S. forces’ post-Desert Storm reliance on high-technology, Somalia’s complete and utter technological backwardness actually was an asset to Aideed.

Lesson Two: In Manhunts, the Decisive Terrain is the Human Terrain

Task Force Ranger’s commander, Major General William Garrison, believed the key to apprehending Aideed was actionable intelligence provided by human intelligence (HUMINT). The original plan had called for the CIA’s top Somali informant – a minor warlord loosely affiliated with Aideed – to present the warlord with an elegant hand-carved cane with a homing beacon embedded in the head. The plan seemed foolproof, until LTC Dave McKnight – commander of the 3/75th Ranger battalion and the task force’s intelligence chief – burst into Garrison’s headquarters at the Mogadishu airport on their first day and exclaimed: “Main source shot in the head. He’s not dead yet, but we’re fucked!” The top Somali CIA informant had apparently been mortally wounded in a game of Russian roulette. By the time Task Force Ranger arrived in Mogadishu in August 1993, the Intelligence Support Activity (Delta Force’s special intelligence cell) and the CIA had completely lost track of the warlord, who had not been seen for a whole month.

The Russian roulette incident, however, was the least of their troubles. Looking at the broader history of strategic manhunts from Geronimo to Osama bin Laden, the clearest dividing line between successful and failed campaigns is the human terrain over which the campaign is conducted. Human terrain determines the ability to obtain actionable intelligence on the target, either from the local population or from within the target’s network. Simply put, if the targeted individual is perceived as a hero or a “Robin Hood” figure, the protection offered by the local population will thwart almost any number of satellites or elite troops. Somalia’s social fabric of interwoven clans, tribes, and warlords proved a particularly formidable intelligence-gathering challenge. Somalia’s racial heterogeneity made it impossible for Task Force Ranger elements to freely collect HUMINT: using an agent outside his own clan territory rendered him suspect, and using an agent from within his own clan risked disinformation. As CENTCOM Commander General Joseph Hoar summarized the campaign: “[there was a] real problem with HUMINT. The people who provided information lacked credibility. . . . The possibility of getting predictive intelligence on Aideed was poor.”

Moreover, early U.S. conventional force operations often exacerbated the problem. On July 12, 10th Mountain Division forces attacked a meeting of Habr Gidr clan leaders, operating on the belief that Aideed would be present. Instead, they ended up killing numerous clan elders, mullahs, and intellectuals, many of whom had in fact opposed Aideed and counseled accommodation with UN forces. As U.S. forces withdrew, an enraged Somali mob beat to death four Western journalists who arrived at the scene to report on the attack. Any remaining Habr Gidr moderates quickly rallied behind Aideed, and the attack caused many non-Habr Gidr to sympathize and even ally with Aideed, further drying up the already sparse HUMINT.

Lesson Three: The Importance of Perseverance

Tactically and operationally, the Battle of Mogadishu was a victory for Task Force Ranger, which had raided into the heart of the adversary’s stronghold in broad daylight and seized 24 prisoners, including the two HVTs they were after. Although the cost was steep, the Somalis had fared much worse, suffering an estimated 500-1,000 fatalities. Many families aligned with Aideed had suffered casualties, and local spies reported some of Aideed’s strongest clan allies had fled Mogadishu fearing the seemingly inevitable American retribution. Others were sending peace feelers, offering to dump Aideed to avoid further bloodshed. Both General Garrison and UN envoy Jonathan Howe believed Aideed had been struck a mortal blow and pressed their respective superiors to finish the campaign.

But back home, the perception in Washington was shaped by the horrifying television images of dead and naked bodies of U.S. soldiers being dragged through the streets of Mogadishu. President Clinton asked his staff, “How could this happen?” and many in Congress demanded an immediate withdrawal from Somalia. Ignoring Garrison and Howe’s recommendation, on October 7 Clinton threw in the towel and announced all U.S. forces would be withdrawn from Somalia by March 31, 1994. As UNOSOM II’s Deputy Commander, U.S. Army Major General Thomas Montgomery recalled, “We wound up . . . giving a victory to Aideed that Aideed did not win on the third day of October.” Or, to paraphrase George Orwell, the quickest way to end an operation other than war is to lose it.

Lesson Four: What Happens in Mogadishu Does Not Stay in Mogadishu

More significant than the failure to catch Aideed was Somalia’s effect on U.S. foreign policy for the remainder of the decade. A week after “The Battle of Mogadishu,” the USS Harlan County withdrew from the Haitian harbor of Port-au-Prince due to an orchestrated riot by fewer than 200 hundred lightly armed demonstrators. The Clinton administration later declined to intervene to prevent repeated atrocities in Bosnia and genocide in Rwanda due to its experiences in Somalia. In a Pentagon study of why America did not seriously pursue Osama Bin Laden prior to 9/11, Professor Richard Schultz concluded: “The Mogadishu disaster spooked the Clinton administration as well as the brass.” After Mogadishu, one Pentagon officer explained, there was “reluctance to even discuss proactive measures associated with countering the terrorist threat through SOF operations.”

Worse, contrary to those who argue that there is no such thing as a “reputation effect” in international relations, amongst the documents captured in Afghanistan in 2001 was an al-Qa’ida correspondent’s “lessons learned” from Somalia, which noted:

There is an important observation that we must not ignore, which is that the Americans were not defeated militarily in Somlia. Effective human and economic losses were not inflicted on them. All that happened was that the Somali battle revealed many of their psychological, political, and perhaps military weakness. The Somali experience confirmed the spurious nature of American power and that it has not recovered from the Vietnam complex. It fears getting bogged down in a real war that would reveal its psychological collapse at the level of personnel and leadership. Since Vietnam America has been seeking easy battles that are completely guaranteed.

Thus, the precipitous withdrawal from Somalia in 1993 and the perception of a continuing “Vietnam complex” may have emboldened bin Laden’s plans to concentrate attacks on U.S. targets. Although Americans have become more inured to SOF casualties since 9/11 (the death of dozens of Navy SEALs in Afghanistan in June 2005 and August 2011 helicopter shootdowns did not lead to calls for immediate withdrawal from Afghanistan), the lesson that “small wars” have large second- and third-order effects will be increasingly relevant again post-Afghanistan.

Lesson Five: Sometimes the Least Bad Option is Good Enough

After the success of Operation Restore Hope’s humanitarian mission, the UN expanded its mandate to include “the rehabilitation of the political institutions and economy of Somalia” even though Somalia had no history of representative government and its civil society had been destroyed by Siad Barre’s dictatorship – in other words, there were few institutions to rehabilitate. In retrospect, it would have been wiser to select an interim strongman and focus on creating Somalia’s political institutions over the long term.

There was somebody America could have theoretically backed in Somalia, but it was the man we wound up hunting. Mohammed Farah Aideed was Western-educated and had the most viable claim to post-Barre rule, having held senior positions in the government (when Barre was not throwing him in jail out of paranoia). He led the alliance that overthrew the dictator and retained the most powerful militia, had children living in the United States (including a son who deployed as a Marine reservist during Operation Restore Hope), and was sympathetic to U.S. strategic interests in the region. Aideed offered to help eliminate Somalia’s Islamist militias, who over the next decade-and-a-half would evolve into al-Shabaab. Was Aideed brutal in the internecine warfare within Somalia? Yes, but his brutality was not exceptional in Somali terms (a point thrown into sharp relief by al-Shabaab’s unmitigated barbarism during the recent Westgate Mall attack). Moreover, Aideed’s brutality only began with the civil war, which would have ended much more quickly and to the benefit of the Somalis if the United States had conditioned its support for him delivery of all food shipments, and made future economic aid contingent on human rights observance and gradual political liberalization. The first thing most doctoral candidates are told when they embark upon writing their dissertations is not to let the perfect become the enemy of the good. This tenet applies as much to policymakers as it does to PhDs, and if it had been adhered to rather than the triumphal idealism of the post-Gulf War UN, both Somalia and the United States would likely have been better for it.

Twenty years after Task Force Ranger endured the abattoir on the streets of Mogadishu, we rightly celebrate the courage demonstrated by men like Medal of Honor recipients Master Sergeant Gary Gordon and Sergeant First Class Randall Shugart, and we honor the sacrifice of the 18 servicemen who gave their lives on October 3 and 4, 1993. But it is also vital not to dismiss the Battle of Mogadishu, the broader manhunt for Mohammed Farah Aideed, or the Somalia intervention as an anomalous “small war” or peacekeeping operation without relevance for U.S. leaders today. The cost of not doing so can be high. Although on August 8, 1993, four American MPs were killed when their Humvee was destroyed by a remotely detonated antitank mine, little was done over the intervening decade to address the threat of IEDs that would later become ubiquitous in Iraq and Afghanistan, killing more than 1,700 Americans in Operation Iraqi Freedom alone.

The lessons of “Black Hawk Down” should teach U.S. policymakers and officers not to become over-reliant on technology as an operational panacea, to prepare the human terrain in advance of a decision to target an individual, and to make long-term investments in indigenous forces and HUMINT networks in strategically vital regions for when emergencies require intervention. The descent of Somalia into a cross between Hobbes’ state of nature and a Mad Max movie that allowed al-Shabaab to flourish should remind policymakers that, although tempting, cutting losses or avoiding costs in the short-term can be more expensive in the long-run. And finally, in a lesson perhaps applicable to Syria, Somalia suggests that sometimes choosing the lesser of two evils is the best policy option available, and that resolutely pursuing an imperfect solution is preferable to ambivalently waiting for the perfect solution to emerge organically.

Benjamin Runkle is a former Defense Department and National Security official and the author of Wanted Dead or Alive: Manhunts from Geronimo to Bin Laden.

Correction: This article originally misidentified LTC Dave McKnight as Danny McKnight and described Master Sergeant Gary Gordon and Sergeant First Class Randall Shugart as Medal of Honor winners rather than recipients.