NEW YORK – Ten Russian agents who infiltrated suburban America and acted as spies for Moscow were deported Thursday.

The spies left New York for Moscow hours after pleading guilty to conspiracy in a Manhattan courtroom and being sentenced to time served and ordered out of the country, said a law enforcement official.

The spies were to be exchanged for four people convicted of betraying Moscow to the West in the biggest spy swap since the Cold War. The swap carries significant consequences for efforts between Washington and Moscow to repair ties chilled by a deepening atmosphere of suspicion.

The agents, many speaking in heavy Russian accents despite having spent years posing as U.S. citizens, pleaded guilty to conspiracy in a Manhattan courtroom.

The 10 U.S. defendants, captured last week across the Northeast, were accused of embedding themselves in ordinary American life for more than a decade while leading double lives complete with false passports, secret code words, fake names, invisible ink and encrypted radio.

One worked for an accounting firm, another was a real-estate agent, another a columnist for a Spanish-language newspaper.

Attorney General Eric Holder said the “extraordinary” case took years of work, “and the agreement we reached today provides a successful resolution for the United States and its interests.”

White House chief of staff Rahm Emanuel said on PBS’ “NewsHour” that President Obama was aware of the investigation, the decision to go forward with the arrests and the spy swap with Russia.

Whether the agents provided Russia with valuable secret information is questionable.

“None of the people involved from my understanding provided any information that couldn’t be obtained on the Internet,” said Robert Baum, attorney for defendant Anna Chapman.

In Russia, the Kremlin said President Dmitry Medvedev signed a decree pardoning four convicted foreign spies so that they can be exchanged for the 10 U.S. defendants.

The Kremlin statement carried by the Russian news agencies says that Medvedev has pardoned Russian citizens Alexander Zaporozhsky, Gennady Vasilenko, Sergei Skripal and Igor Sutyagin.

Sutyagin, an arms analyst, was reportedly plucked from a Moscow prison and put on a plane to Vienna. Skripal is a former colonel in the Russian military intelligence, and Zaporozhsky is a former colonel in the Russian Foreign Intelligence Service.

The U.S. Justice Department said in a letter Thursday that some of the four prisoners are in poor health and had served lengthy prison terms. Three of the four were accused by Russia of contacting Western intelligence agencies while they were working for the Russian or Soviet government, the letter stated.

The 10 suburban spies in the U.S. pleaded guilty to conspiracy to act as an unregistered agent of a foreign country and were ordered deported. An 11th defendant has been a fugitive since fleeing authorities in Cyprus following his release on bail.

One defendant’s attorney said a private plane was expected to take the 10 to Russia within days.

The attorney, John Rodriguez, said his client, Vicky Pelaez, had been given only 24 hours to say yes or no to the “all or nothing” deal for deportation.

The defendants — led into court in handcuffs, some in prison smocks and some wearing T-shirts and jeans, provided almost no information about what kind of spying they actually did for Russia. Asked to describe their crimes, each acknowledged having worked for Russia secretly, sometimes under an assumed identity, without registering as a foreign agent.

One, Andrey Bezrukov, smiled and waved to a supporter in the audience and had an animated conversation with another, Elena Vavilova. Vladimir and Lydia Guryev, who lived in the United States as a couple under the aliases Richard and Cynthia Murphy, sat side by side but didn’t speak.

Pelaez’s two sons were among the children of the accused spies in court. A lawyer for her husband said the children would have the option of returning to Russia with their parents or staying in the U.S.

Chapman, whose photos gleaned from social networking sites made her a tabloid sensation, pulled back her mane of red hair as she glanced around the courtroom. A burly deputy U.S. marshal hovered behind her.

All the defendants stood and raised their right hands in unison to be sworn in before answering a series of questions from the judge, beginning with a request to state their true identities. Their answers were short and scripted, their 10 guilty pleas given one by one in assembly-line precision.

Chapman looked baffled when the judge asked if her secret laptop exchanges with a Russian official “were in furtherance of the conspiracy.” She finally looked at her lawyer, shrugged and replied, “Yes.”

Assistant U.S. Attorney Michael Farbiarz said Russian officials had visited with the defendants numerous times in prison, and he sought assurances that none of the pleas resulted from inducements that might have been offered by Russian authorities.

Rodriguez, the attorney, said in court that the Russian government had promised Pelaez $2,000 a month for life, housing and documents to allow her children to visit Russia and have all their expenses paid. She said the promises did not induce her to plead guilty.

Vladimir Guryev acknowledged that from the mid-1990s to the present day, he lived in the U.S. under an assumed name and took directions from the Russian Federation.

Asked whether he knew his actions were a crime, he said:

“I knew they were illegal, yes, your honor.”