Alphabet Inc. shares popped 7% in after-hours trading Thursday after the online giant announced better-than-expected financial results.

The Mountain View, Calif.-based company GOOGL, +1.13% GOOG, +1.16% reported second-quarter net income of $9.95 billion, or $14.21 a share, compared with $4.54 a share in the year-ago period. Revenue was $38.94 billion, up 19% from the same quarter a year ago. Analysts surveyed by FactSet had estimated $11.10 a share on revenue of $38.15 billion.

Google properties led the way in revenue with $27.3 billion, up 18% from $23.3 billion in the year-ago quarter. Additionally, Google announced a $25 billion stock repurchase plan.

In its press release announcing the results, Alphabet did not publicly confirm it is the subject of an antitrust investigation by the Justice Department and Federal Trade Commission, as Facebook Inc. FB, +2.12% did Wednesday afternoon. Facebook shares were largely unscathed from the disclosure and other issues at that company, a testament to its vice-like grip on the digital-advertising market it dominates with Alphabet. (Ironically, Google is the dominant player in global ad search spending, with 61% of the $141.2 billion market, according to researcher eMarketer.)

A 16% surge in ad sales year-over-year to $32.6 billion eased concerns of a persistent slowdown in Alphabet’s core business. Sales for cloud and YouTube were particularly strong, Google Chief Financial Officer Ruth Porat told analysts during a conference call following the earnings release. Alphabet shares inched up to 9% during the call.

Pichai broke from recent company policy and disclosed its cloud division has reached an annual run rate of over $8 billion, the first financial update Google has shared since February 2018 when Pichai said cloud was “already a billion-dollar-per-quarter business.” In other words, cloud sales have doubled in less than 18 months.

The dark cloud of federal antitrust investigations of Google, Apple Inc. AAPL, +3.75% , Amazon.com Inc. AMZN, +2.49% , and Facebook is expected to increasingly weigh heavily on their results in coming quarters, Wedbush Securities analyst Daniel Ives said.

“We understand there will be scrutiny,” Google CEO Sundar Pichai answered one analyst when pressed on the regulatory climate. “It’s not new to us” around issues such as competition and copyright protection.

Alphabet stock is up 9% this year, less than half of the 20% gain of the S&P 500 index SPX, +1.59% . By comparison, Facebook shares are up 53%, Apple has improved 31%, and Amazon is up 31%.

Google was hurt by disappointing first-quarter numbers three months ago — it fell nearly $1 billion short of revenue projections— and its habitual reluctance to break out specific financial performance figures. Add to that the continuing scrutiny it faces from U.S. and European regulators, and Google has given pause to some analysts.

More: OK Google, tell us why your earnings growth is slowing down ... hello? Anyone there?

In the days leading to Alphabet’s results, a handful of financial analysts weighed in with positive research notes, underlying faith in continued strong search sales despite the Justice Department investigation. Credit Suisse analyst Stephen Ju, in a Monday note, predicted “advertiser adoption of new ad products/units typically tends to pick up sometime in 3Q and more so in 4Q.”