Shares in Alphabet, Google's parent company, jumped as much as 5% in after-hours trading after the firm reported stronger ad sales than expected.

Alphabet earned $32.7bn in revenue in the three months to the end of June, up 26% from the same period last year.

But the record 4.34bn EU fine over over Google's Android mobile operating system knocked $5bn off its profits.

Alphabet reported net income of $3.2bn. Without the fine, it would have been almost $8.3bn, the firm said.

The EU said Google had used the mobile operating system to illegally "cement its dominant position" in search.

Alphabet is appealing the decision, which drove a 36% increase in costs in the quarter.

On a call with financial analysts, chief executive Sundar Pichai said it was too early to say how the changes requested by regulators would affect the firm's business over the long term.

"There is more work to be done and I think it will become clearer as we go along," he said.

Mr Pichai also said it was too early to say what effect Europe's new privacy law - the General Data Protection Regulation (GDPR) - is having.

Digital ad market
Alphabet, which relies on advertising for the bulk of its business, is facing an increasingly competitive market, as firms such as Amazon make inroads.

In March, the research firm eMarketer estimated that Google would capture about 37% of digital ad spending in the US this year, down from almost 39% in 2017.

Despite the competition, Alphabet said pressure from traffic acquisition costs, which reflect what it pays other companies to drive users to its sites, had lessened.

As a share of ad revenue, those costs fell from 23% to 22%.

Alphabet has also branched out into a range of other areas, including cloud computing, YouTube and driverless cars.

The firm said cloud computing and YouTube are enjoying growth.

Its Other Bets segment, which includes companies like the driverless car firm Waymo, reported a quarterly operating loss of $732m, up from $633m last year.