Those programs incensed Europeans. Germany's Social Democratic leader Peer Steinbrueck, the main election challenger to Chancellor Angela Merkel, said last month he would suspend negotiations with the U.S. over a free-trade agreement until Washington clarified details about the NSA's surveillance programs. Merkel also raised the issue with Obama when he visited Berlin earlier this year.
The controversy surrounding the NSA surveillance programs is sure to follow the president when he attends the Group of 20 economic summit in Russia, the second stop on his three-day overseas trip. Russia's government granted Snowden temporary asylum, defying Obama's demands that the 30-year-old American be returned to the U.S. to face espionage charges.
Snowden is accused of leaking highly secretive documents to The Guardian and Washington Post newspapers.
Russia's decision to allow Snowden into the country worsened the already tense ties between Obama and Russian President Vladimir Putin. The U.S. president called off plans to hold one-on-one talks with Putin in Moscow before the G-20, choosing instead to add a last minute stop in Sweden to his travel itinerary.
While the Swedish government bills itself as a champion of Internet freedom, officials said ahead of Obama's visit that they wouldn't raise the sensitive issue with the U.S. president.
However, Internet freedom advocates protesting U.S. surveillance programs were among thousands of demonstrators who gathered in Stockholm for a peaceful protest against Obama's visit.
Swedes reacted with outrage in 2008 over a law that gave a Swedish intelligence service the green light to snoop on email traffic crossing the country's borders. Sweden's small Pirate Party, which advocates freedom on the Internet and is highly critical of government surveillance, has inspired the creation of similar parties across Europe and beyond.
Air Force One touched down in Stockholm Wednesday morning after an overnight flight from Washington. Obama was greeted on the mild, sunny morning by crowds that lined the streets in central Stockholm to watch his motorcade speed by.
Obama's trip marked the first bilateral visit by a sitting U.S. president to the northern European nation. Thousands of armed police were deployed on city streets, many roads and parks were closed in the downtown area, and concrete barriers and steel fences have sprung up in many locations near where the president was staying.
Following his meeting with the prime minister, Obama paid tribute to the late Swedish diplomat Raoul Wallenberg, who is credited with saving at least 20,000 Jews during World War II. Wallenberg was arrested by Soviet forces in 1945 and mysteriously disappeared.
As he spoke of Wallenberg, Obama appeared to make a veiled reference to the choice that confronts him about using military force in retaliation for a deadly chemical weapons attack in Syria, where more than 100,000 people have already died in a civil war. The president spoke of "our power when we choose, not simply to bear witness, but also to act."
Wallenberg's family had planned to present a letter to Obama asking for help in pressing Russia to shed light on Wallenberg's fate.
Obama also ate dinner Wednesday night with other Nordic leaders from Norway, Iceland, Finland and Denmark.
___
Associated Press writers Josh Lederman, Karl Ritter and Malin Rising in Stockholm and Jack Gillum in Washington contributed to this report.
___
Follow Julie Pace at http://twitter.com/jpaceDC