New York - US stocks followed European markets higher on Wednesday after a German court gave its approval to the eurozone's permanent crisis fund, opening the door to more aid to embattled Spain.
Facebook shares soared more than seven percent meanwhile after founder Mark Zuckerberg said the company was focused on making money in the mobile phone side of the market and regretted the stock's dismal post-IPO performance.
Tech heavyweight Apple lifted the Nasdaq after launching its highly anticipated next-generation smartphone, the iPhone 5.
The Dow Jones Industrial Average edged up 9.99 points to close at 13,334.05.
The S&P 500-stock index rose 3.00 to 1,436.56, while the tech-rich Nasdaq added 9.78 at 3,114.31.
"Undoubtedly, it is a good day for the eurozone and financial markets," said economist Andreas Rees at Unicredit after the German constitutional court said the new European Stability Mechanism is legal.
"Together with last week's pledge made by the ECB of buying government bonds to an unlimited extent, an impressive firewall for the eurozone is now building up," he said.
Apple bounced 1.4% higher, to $669.79, on the introduction of a slimmer, more powerful version of its iconic iPhone.
Facebook shares rebounded 7.7% to $20.93, still far below their $38 May initial public offering price, after Zuckerberg made his first comments on the company's direction since the IPO, calling Facebook "a mobile company."
Analysts have expressed worry that Facebook is unable to monetize its presence on mobile phone screens with advertising.
"It is really clear from the stats and my own personal intuition that a lot of energy in the ecosystem is going to mobile, not desktop," Zuckerberg said in San Francisco.
"That is the future," he said. "We are going to be doing killer stuff there."
Boeing fell 0.4% after European rivals EADS and BAE Systems revealed merger talks.
Troubled Chesapeake Energy shed 1% after announcing it would sell $6.9bn in energy assets in Texas and New Mexico to help pay down debt.
AIG was up 1.1% after the US Treasury sold off $20.7bn in shares in the insurer.
Bond prices fell. The yield on the 10-year Treasury climbed to 1.76% from 1.70% on Tuesday, while the 30-year yield rose to 2.93% from 2.85%. Bond yields move inversely to prices.