This story originally appeared on Feb. 24, 2015. The Air Force unleashed its first major drone program during the Vietnam War. In short order,...

The Air Force unleashed its first major drone program during the Vietnam War. In short order, the North Vietnamese compromised the aerial spies’ codes and began blowing them out of the sky.

An angry general, a group of NSA spies and a crash program to secure the drone’s communications systems stopped the Vietnamese snooping.

“Experiences with the Air Force’s drone reconnaissance program provide a dramatic illustration of the vulnerability of U.S. communications practices and the willingness of a clever enemy to exploit them,” NSA historians declared in On Watch: Profiles of the National Security Agency’s Past 40 Years, a heavily-redacted internal history.

The NSA released a censored copy of the history in 2007, in response to a Freedom of Information Act request.

From 1964 onward, the Air Force’s Strategic Air Command flew pilotless Ryan Model 147 drones over North Vietnam on a regular basis.

The Pentagon first looked into potential leaks about the Air Force’s unmanned spies in 1967. The year before, NSA analysts deduced that the North Vietnamese—with help from Chinese specialists—cracked American codes and listened in on radio chatter.

As a result, Hanoi got advance notice of American air strikes. The drones didn’t carry weapons, but the Air Force used them to surveil potential bomber targets. The North Vietnamese used this information to set ambushes, locate the drones and shoot them down.

The security breach infuriated Gen. Earle Wheeler—then chairman of the Joint Chiefs of Staff. After the general sat through a briefing on the matter, he cursed.

“Wheeler’s only response was to slam his fist on the desk and shout, ‘Goddam[n] it, we’ve been penetrated!” stated another redacted historical monograph of NSA operations in Vietnam, also released in 2007.

To find the source of this security breach and fix it, Wheeler started Operation Purple Dragon, which comprised a team of agents from the NSA, the Defense Intelligence Agency and various military intelligence units.

The Purple Dragon group had the authority to dig into any and all military activities going on in the Pacific—including the Air Force’s drones.

Above—a DC-130 “mother ship” takes off in South Vietnam. At top—a Ryan Model 147 reconnaissance drone. U.S. Air Force photos

To be sure, America’s drones in Vietnam were primitive compared to the high-tech machines the military uses today.

Instead of taking off from a runway on the ground, a special DC-130 cargo transport, known as a “mother ship,” first carried the unmanned Ryan drone into the air. Once airborne, the DC-130 launched the Ryan, which flew toward its destination on autopilot.

The drone snapped photographs from various altitudes or scanned the airwaves, depending on the particular variant. A few modified drones jammed enemy radars and dropped propaganda leaflets.

“Controllers in the mother ship monitored the drone’s guidance system in case the vehicle departed from the desired track,” according to an official Air Force history. “Usually a drone would make runs over several target areas before turning toward the recovery area.”

The drone didn’t land like an airplane, either. After a Ryan reached its recovery area, its motor cut out and a parachute popped out of the top.

As the aircraft floated to earth, a modified CH-3 helicopter swooped in and used a trapeze to literally snatch the drone out of the air. The chopper crews then flew back to base with their prize.

An illustration showing the procedure for snatching drones in mid-air. U.S. Air Force art

Unfortunately, the Ryan proved vulnerable to surface-to-air missiles, anti-aircraft guns and fighter jets. The small Ryan drone cruised at relatively slow speeds—easy prey for North Vietnamese pilots.

“[But] American commanders … were convinced that the North Vietnamese anti-aircraft units could not have enjoyed such continuing success without accurate advance knowledge on the drones’ arrival time and altitude,” noted the NSA’s historical review.

In South Vietnam, a team of American spies discovered that Hanoi cracked the drone units’ codes. The Purple Dragons—as these security specialists became known—brought in special gear to help protect the transmissions.

“To the surprise of no one on the Purple Dragon team, the very next day the drone loss rate plummeted and stayed down for quite a while,” the NSA history states.

While the agency censored many of the details, the problem apparently resurfaced. The military called the Purple Dragons in again.

The spies discovered that while having secure radios on the ground was all well and good, the DC-130s “mother ships” still transmitted unsecured messages. Those aircraft got new communications equipment, too.

“Once that was done, drone losses to enemy action fell off to one or two a year, compared to two or three a week in the pre-Purple Dragon days,” according to NSA’s record.

The Air Force did their best to conceal the program. In eight years, the flying branch changed the code name for these missions four times—Blue Spring, Bumble Bug, Bumpy Action and finally Buffalo Hunter.

And between 1970 and 1972, the Air Force still lost more than 100 drones, according to an official report. However, the Pentagon believes Hanoi’s forces only conclusively shot down 15 of them.

“Many times drones went down for no apparent reason,” the record explains. “Such losses were possibly the result of enemy action, but more likely a guidance system malfunction or a mechanical failure was responsible.”

Whatever the case, it wasn’t a job for Purple Dragon. The project was actually so successful that the Pentagon ordered similar efforts around the world, and across all the services.

But there’s a lesson. Whenever you use drones to spy on another country, that country will try to spy on you. In 2011, one of the CIA’s stealthy RQ-170 spy drones crashed in Iran—likely the result of Tehran cracking its guidance and communications systems.

Which shows that, really, the North Vietnamese were ahead of the curve.