Shares of Google, which had risen to all-time highs in recent weeks, were down more than 5 percent at $863 in after- hours trading on Thursday, having earlier closed at $910.68 on the Nasdaq.

The average price of Google's online ads decreased 6 percent year-on-year in the second quarter, compared with the first quarter's 4 decrease, even as the overall number of Internet user clicks on Google ads increased 23 percent during the quarter.

"Most of these incremental clicks (on ads) are either coming from international or mobile (users), which are not as high-priced as domestic or desktop clicks," said Sameet Sinha, an analyst with B. Riley & Co. "International and mobile don't monetize as well. That's the main concern. Those businesses are less profitable."

Google, the world's No. 1 Internet search engine, said net income in the quarter was $3.23 billion, or $9.54 per share, compared with $2.79 billion, or $8.42 per share, in the year-ago period.

Excluding items, Google earned $9.56 per share, lower than the $10.78 expected by analysts, according to Thomson Reuters I/B/E/S.

Google's consolidated revenue, which includes results from its Motorola mobile phone business, was $14.11 billion in the second quarter, versus $11.81 billion in the year-ago period. Analysts expected $14.4 billion.

Revenue for its core business rose 20 percent to $13.11 billion.

Operating margins dipped to a lower-than-expected 28 percent in the quarter from 33 percent a year earlier. Motorola, a money-losing handset manufacturer Google acquired in 2012, racked up a loss of $218 million before items, more than four times the $49 million it lost a year earlier.

"It's a little bit of a concern. Maybe they are not getting enough early traction with enhanced campaigns. The trajectory with CPCs should be getting a little better," said Kerry Rice, an analyst at Needham & Co. The operating margins miss, partly on Motorola's swelling losses, were another cause for worry. CPC stands for cost per click.

"Google outsourced the Motorola manufacturing and sold the home business, so I would have expected Motorola's margin to be higher."

(Reporting By Alexei Oreskovic; Editing by Steve Orlofsky)

By Alexei Oreskovic