SAN FRANCISCO -

Google

(GOOG) - Get Report

handily topped Wall Street estimates for the third quarter, sending the stock soaring and undercutting arguments that it would bow to economic pressure.

The company said it earned $1.35 billion, or $4.24 a share, in the third quarter. Excluding certain items, it earned $1.56 billion, or $4.92 a share.

That was well above Wall Street's estimates of $4.80 a share.

Third-quarter revenue was up 31% to $5.54 billion. Excluding traffic acquisition costs, revenue totaled $4.04 billion, falling just shy of analysts' estimates of $4.05 billion.

"While we are realistic about the poor state of the global economy, we will continue to manage Google for the long term, driving improvements to search and ads, while also investing in future growth areas such as enterprise, mobile, and display," said Chief Executive Eric Schmidt in a statement.

Google-owned sites generated revenue of $3.67 billion, or 67% of total revenue, in the third quarter, a 34% increase from a year ago. Google's partner sites generated $1.68 billion, or 30% of total revenue, in the third quarter, a 15% increase from a year ago.

Shares of Google were up nearly 7% to $376.82 in recent after-hours trading. The stock has gotten battered in recent days on concern that shrinking

advertising spending

would take a toll on the company.