Google parent company Alphabet will buy Fitbit, according to an announcement Friday, putting the tech giant head-to-head with Apple in the fitness tracking space. The deal values Fitbit around $2.1 billion at a fully diluted equity value, according to the release.

Fitbit’s stock surged around 17 percent Friday morning. Shares of Alphabet were up about 0.6 percent

Google will pay $7.35 per share in cash for the acquisition. Fitbit’s all time high share price was $51.90 on Aug. 5, 2015, a couple months after its stock market debut at $30.40. The deal is expected to close in 2020, according to the announcement.

On Monday, Fitbit’s stock surged more than 30 percent on news that Alphabet had made an offer to acquire the smartwatch maker. As of Monday’s close, Fitbit’s market cap sat at $1.5 billion, up $340 million from the previous trading day.

Following the announcement, Google’s hardware chief Rick Osterloh released a blog post explaining how the acquisition can help Google advance its ambitions for Wear OS, its software for smartwatches.

“By working closely with Fitbit’s team of experts, and bringing together the best AI, software and hardware, we can help spur innovation in wearables and build products to benefit even more people around the world,” Osterloh said in the post. “Google also remains committed to Wear OS and our ecosystem partners, and we plan to work closely with Fitbit to combine the best of our respective smartwatch and fitness tracker platforms.”

Google will not use health and wellness data from Fitbit for its ads, according to the announcement.

The move comes after Google announced a deal to buy $40 million worth of Fossil’s smartwatch technology in January. Fossil was already one of the primary brands building smartwatches on Google’s Wear OS.

Buying Fitbit could help Google extend its “ambient computing” hardware strategy, where the company aims to be a part of users’ lives wherever they are. The company has hinted at its health and hardware ambitions with the introduction of several new products in October, including the new Pixel 4 smartphone, and the hire of former Geisinger Health CEO David Feinberg last year to consolidate its health-care strategy.

Fitbit has suffered headwinds as Apple’s popular smartwatch grows. Fitbit lowered its guidance for the year in its July earnings release, citing weaker-than-expected sales of its new lightweight watch.

As of the end of 2018, Apple owned about half of the global smartwatch market in 2018 in terms of units shipped, according to Strategy Analytics. Google currently licenses its Wear operating system to companies such as Fossil but does not make its own smartwatch.