It took less than month for the largest U.S.-Russian spy swap since the Cold War to unfold from an idea secretly hatched in the Oval Office to reality on a remote stretch of Vienna airport tarmac.

The whirlwind exchange took place Friday in a choreographed script of spy novel intrigue. Two planes, one from New York, the other from Moscow, arrived within minutes of each other and parked nose-to-tail. Their passengers — 10 Russian sleeper agents arrested in the U.S. and four prisoners accused by Russia of spying for the West — were ferried to each other, and the planes departed again just as quickly.

The whole thing, a soundless drama seen only at a distance through camera lenses, took less than an hour and a half — displaying the efficiency of this extraordinary new chapter in U.S.-Russian relations.

The 10 Russian agents who had blended into U.S. communities, including Anna Chapman, the woman who had caught Americans' fancy with her Facebook photos, soon landed in Moscow. And four other Russians accused of spying for the West headed the other way, two of them arriving at Dulles International Airport outside Washington at the end of the capital's workday.

Their chartered aircraft, a maroon-and-white Boeing 767-200, had stopped briefly at a southern England air base, where a U.S. official said two of the four were dropped off before the plane continued across the Atlantic.

The swap idea was Washington's, first raised with President Barack Obama nearly a month ago when the FBI and Justice Department officials who had been watching the 10 Russian agents hiding in suburban America for over a decade informed the president it was time to start planning their arrests, according to two White House officials, who spoke on condition of anonymity under ground rules set by the White House.

What was known as "the illegals program" had been first brought to the White House's attention months before, in February, triggering weeks of meetings about how and when to proceed, the officials said. It became clear in early June that at least two of the Russians were making plans to leave the U.S., meaning the whole operation now had to be rolled up more quickly than originally thought.

The timing of the arrests was deliberated with Obama on that June 11 Friday afternoon in the Oval Office, along with the expected charges for the individuals and the potential impact on Washington's freshly "reset" relationship with its former Cold War rival. Also considered, the officials said, was the matter of what should happen afterward. One of the recommendations was to propose a swap to Russia.

The arrests were not planned to facilitate such a trade, said a separate U.S. official, speaking on condition of anonymity to discuss matters of intelligence. But since the Russian agents had never penetrated the U.S. government, it seemed Washington could benefit more from using them for barter than as prisoners to be locked up for years.

The president approved.

Thirteen days later, Obama hosted Russian President Dmitry Medvedev at the White House for the first time, the two chummy over hamburgers in nearby Arlington, Va., and showing off a rapport to reporters that would have been unthinkable during the nations' diplomatic low points. But transparency goes only so far. Though preparations for the arrests were moving forward — and would take place just three days later — Obama kept quiet, the White House officials said.

At that point, White House aides and their counterparts from several agencies, including the CIA, FBI, Justice and the State Department, were meeting early every morning — "too early," complained one aide — via secure videoteleconference.

Shortly after the June 27 arrests, CIA Director Leon Panetta provided Russia's spy chief, Mikhail Fradkov, the names of four prisoners being held in Russia that the U.S. wanted to free, the officials said.

This was no dragged-out negotiation. By the following Saturday — the July 4 holiday weekend in the States and less than a week and three phone conversations after the arrests — Panetta and Fradkov, the head of Russia's Foreign Intelligence Service, had agreed to the deal by phone, the officials said.

A flurry of bureaucratic wrangling followed. Russia required signed confessions from the four in order to make way for pardons from Medvedev. And court appearances and plea deals were hastily arranged in the U.S. for the Russians.

One U.S. condition of the swap was that the deal not be accompanied by any retaliatory steps against Americans. The officials also said that Washington got everything it asked for out of the case — emphasizing that the U.S. didn't ask for any prisoners beyond the four.

The officials also said that all of the children of the Russian spies had left the United States for Russia or were in the process on Friday of leaving.

Both sets of prisoners were abruptly entering radically different lives.

The 10 Russian agents and their families traded ordinary but fictional American lives for the realities of modern Russia. And early indications were that the spy ring — which apparently uncovered little of value and were watched by the FBI for years — would not get a hero's welcome.

More coverage:

• U.S., Russian flights land in Vienna for spy swap

• Kids might not follow Russian spy parents

• Russian agents living in Montclair admit true identities in court

• Accused Russian agents are sentenced to time served, ordered to be deported

• U.S. prosecutors unseal indictment against alleged Russian agents

• Quiet 4th of July for residents of Montclair street where alleged Russian agents lived

• Threat posed by accused Russian agents is more than late-night comedy, experts say

• Two accused Russian agents admit using false identities

• Federal investigation into alleged Russian spy network began a decade ago

"They obviously were very bad spies if they got caught. They got caught, so they should be tried," said Sasha Ivanov, a businessman walking by a Moscow train station.

The four Russians accused of spying for the West, meanwhile, were sprung from dismal Russian prisons. But, facing separation from loved ones and homeland, it was unclear where any of them planned to settle.

One of the four — Alexander Zaporozhsky — is a former colonel in the Russian Foreign Intelligence Service, sentenced in 2003 to 18 years in prison for espionage on behalf of the United States. Another, think tank analyst Igor Sutyagin, says he didn't pass along any information that wasn't available through open sources.

Sutyagin, a 45-year-old arms researcher convicted of spying for the United States via an alleged CIA front in Britain, had told relatives earlier that he was loath to leave his homeland. He said he signed a confession and agreed to be part of the swap out of concern he would otherwise ruin everyone else's chances — and for fear of abuse and misery in the three years remaining in his prison term.

The others were Sergei Skripal, a former colonel in the Russian military intelligence, who was found guilty of passing state secrets to Britain and sentenced to 13 years in prison in 2006, and Gennady Vasilenko, a former KGB officer. The latter was sentenced in 2006 to three years in prison for illegal weapons possession and resistance to authorities.

A U.S. official confirmed that Skripal and Sutyagin were the two men who disembarked in Britain. The official insisted on anonymity as a condition of discussing intelligence matters.

Some touchy elements remain unresolved. The alleged paymaster for the U.S. spy ring was still a fugitive after jumping bail in Cyprus.

But one thing was clear: Both sides were eager to resolve as quickly and cleanly as possible a matter that could have threatened the fragile recent progress in U.S.-Russian relations, with Moscow wanting to make strides as a cooperative partner and the U.S. trying to steer clear of new resentments.

As evidence of just how keenly they wanted to move on, Obama and Medvedev themselves have not talked once about the situation. And, said the White House officials, they don't plan to.