BOGOTA, Colombia (CNN) -- Government agents posing as rebels tricked a gang of armed desperados into handing over 15 hostages during a rendezvous deep in Colombia's unforgiving jungle.

The Colombian government's bloodless rescue of the hostages Wednesday was the product of a perfectly executed ruse that depended on old-school spy games rather than high-tech gadgetry.

Agents spent months worming their way into the Revolutionary Armed Forces of Colombia, or FARC, an insurgent force that has waged war on the Colombian state for 40 years, Gen. Freddy Padilla de Leon told CNN.

The agents gained the rebels' trust and rose to the top of FARC's leadership council as well as a team assigned to guard the hostages.

When the time was ripe, the moles used the authority they'd gained within the group to order the 15 hostages moved from three separate locations to one central area, and the game was on. Watch how the operation went down »

"We convinced the FARC that they were talking to those of their own," said Gen. Mario Montoya of the Colombian army. "It was all human intelligence."

iReport.com: Reader witnesses hostage release in Colombia

Once the hostages -- including former presidential candidate Ingrid Betancourt and three American contractors -- were gathered, the agents ordered a 90-mile march through the steamy jungle, Montoya said.

Such relocations were not unusual for the hostages or the rebels, who constantly move about to avoid detection by the Colombian military. Watch what the FARC is all about »

Little did the rebels know that the military was about to pull off a bait-and-switch that would leave them standing in a jungle clearing, not realizing they'd just been hustled out of their most valuable assets. See former hostages, officials exult »

The agents told their FARC comrades that an "international mission" -- such as the Red Cross or a U.N. delegation -- was coming to visit the hostages, Montoya said.

At the appointed hour, an unmarked white helicopter set down in the jungle along the trekkers' path. Colombian security forces posing as FARC rebels jumped out, some wearing shirts emblazoned with the likeness of revolutionary icon Che Guevara. Background on FARC »

The helicopter crew told the 60 or so real rebels that the chopper was going to ferry the hostages to the meeting with the "international mission," Montoya said.

During their 22 minutes on the jungle floor, the government pilot and co-pilot spoke in code with their colleagues, authorities said, using phrases such as "Generators OK" that carried a secret meaning to the security forces.

All 15 hostages were handcuffed and placed aboard the helicopter, along with two of their guards, leaving the rest of the FARC detachment on the ground.

Once the chopper was up and safely away from the landing zone, the fake rebels persuaded the real ones aboard to hand them their weapons. Moments later, both rebels were on the floor of the aircraft, cuffed and blindfolded by their erstwhile comrades, Betancourt said. Watch Betancourt describe her 'miracle' »

A crew member turned and spoke to the hostages.

"We are the national military," he said, Betancourt recalled. "You are free."

All About Colombia • FARC • Hostage Situations • Espionage and Intelligence