Alphabet’s earnings also got a multibillion-dollar boost from the company’s stakes in startups including Uber Technologies Inc. but were tempered by the costliest spending spree in its 14-year history as a public company.

Net profit jumped 73% to $9.4 billion in the first quarter, up from $5.4 billion in the same period last year, a performance that highlights the firm’s huge lead in the global market for online ads. The earnings growth was Alphabet’s strongest since the fourth quarter of 2009.

Advertising revenue, which accounts for nearly all of the company’s top line, soared 24% to $26.6 billion. Revenue from “Other Bets,” a segment which includes Waymo self-driving cars, totaled $150 million, an increase of 14% from the same period last year.

The results landed while regulators in Washington are considering getting tougher on internet privacy. While most of the attention on the issue has focused on Facebook Inc., many observers believe Google’s dominant role online means the firm will also be subject to tougher scrutiny. The European Union is also moving forward with a sweeping set of rules called the General Data Protection Regulation, which goes into effect May 25. The new law could affect the revenue of Alphabet, which has already announced some changes to the way it collects consent from visitors of sites displaying its ads.

Related

Companies found in violation of the sweeping regulation will face fines of up to 4% of their annual global revenue.

Asked about the impact of the European regulations on a call with analysts Monday, Chief Executive Sundar Pichai said Google has spent more than a year preparing to be compliant. Because Google derives most of its revenue from search ads, which rely less on personal targeting, much of its business won’t be affected by the changes, he said.

Alphabet’s first-quarter earnings received a boost from a change in accounting rules that caused the company to begin reporting the current fair value of nonmarketable securities, including its valuable stake in ride-hailing giant Uber.

Alphabet attributed about $3 billion of its net profit increase to the value of those securities, though the company didn’t break out individual holdings or disclose what portion of that increase was made up by Uber.

The fair value of Uber shares is something of a mystery. Last December, Uber backers and employees sold shares to a group of investors led by SoftBank Group Corp. at a $48 billion valuation—a roughly 30% discount to the last time it sold new shares to investors, at a $68 billion valuation.

Alphabet’s earnings boost helped offset the rising costs it pays partners such as Apple Inc. to direct more smartphone users to Google’s search engine. Those costs have raised concerns that the company has to give up chunks of its revenue to maintain its level of growth.

Brian Wieser, an analyst at Pivotal Research, said the advertising business not based on Google’s home page search activity—which comes from partners—“is growing faster, which helps their top line, but is lower margin.”

Traffic costs rose to $6.3 billion, up 35% from a year earlier and have made up one-fifth of the company’s revenue for five consecutive quarters.

The company also drastically increased its spending in other areas. Alphabet spent $7.3 billion on capital expenditures in the first quarter of the year, more than triple the amount it spent a year earlier. That included its $2.4 billion purchase of a building in New York’s Chelsea Market as well as investments in data centers and undersea cables.

The spending caps several quarters of rising costs at Alphabet, which is investing in the infrastructure the company says is critical to maintaining its lead in future technologies such as machine learning, a branch of computer science dedicated to helping computers find patterns in data.

Alphabet Chief Financial Officer Ruth Porat suggested the spending could continue, saying “it reflects the demand we are seeing” and not one-off expenses.

Alphabet’s shares were little changed in after-hours trading.

Google has maintained its lead in the global market for online ads despite its massive size and growing competition from fast-expanding challengers. Google is expected to control 31% of the global ad market this year, down slightly from 31.7%, according to estimates from eMarketer.

Google’s ad business accounts for the vast majority of revenue but the company is increasingly looking to emerging areas, such as Waymo and high-tech health-care division Calico, for continued growth.

Alphabet generally doesn’t disclose results from those units individually, but it did give investors a rare glimpse at the financials of Nest Labs, the pioneer in internet-connected home devices such as thermostats and home security cameras that the company acquired for $3.2 billion in 2014.

In all four quarters of 2017 combined, Nest generated $726 million in revenue, or about 60% of the total sales of the “Other Bets” segment over that period, according to Alphabet’s data. Nest was moved from “Other Bets” to the Google unit last year, a move seen a retrenchment of Alphabet’s strategy to let more units grow as independent businesses.

Nest has been slow to release new products and has been upstaged by talking speakers with embedded virtual assistants—mainly the Amazon Echo and Google Home—which have become the hubs for connected homes.

Alphabet doesn’t share results for a much bigger driver of revenue, YouTube. Some investors and others have renewed calls for more transparency from YouTube, which analysts estimate will generate from $11 billion to $20 billion this year, representing between 10% and 18% of Alphabet’s overall revenue.

The company said the product was part of a broader suite of ad-supported businesses.