Image copyright Smith Collection/Gado

Fitness device marker Fitbit is being bought by Google for $2.1bn (£1.6bn).

The move allows Google to expand into the market for fitness trackers and smart watches. It comes at a time when loss-making Fitbit has been looking to expand into other areas.

"Google is an ideal partner to advance our mission," said James Park, co-founder and chief executive of Fitbit.

The bid values Fitbit at $7.35 a share, a premium of about 19% to the stock's closing price on Thursday.

"With Google's resources and global platform, Fitbit will be able to accelerate innovation in the wearables category, scale faster and make health even more accessible to everyone," said Mr Park, who founded Fitbit 12 years ago.

The company, one of the first sellers of tech-enabled fitness trackers, was valued at more than $4bn at the time of its flotation in 2015.

It has sold more than 100 million devices, but has struggled with waning demand for its products as other companies enter the market. It put itself up for sale last month.

Its shares have jumped 40% since Monday, when Reuters reported the interest from Google.

Image copyright Getty Images Image caption James Park founded Fitbit 12 years ago

The transaction is expected to be completed in 2020, pending approval by the board and regulators.

Regulators in the US and abroad have been taking a closer look at acquisitions by the tech giants, amid growing concerns about monopoly power.

Fitbit said its "health and wellness" data would not be used for Google adverts and pledged to maintain strong privacy protections.

But analysts said the health data was key the deal.

"The deep health and fitness data, coupled with the 28 million active users on the Fitbit platform, offer a tremendous value," Craig Hallum analysts wrote in a note cited by Reuters.

Will Fitbit users be happy?

Analysis by Dave Lee, BBC North America technology reporter

Here's a deal that makes perfect sense for Google. While $2.1bn is a pretty hefty premium given Fitbit's market value was around the $1.4bn-mark last week, it's small change when considered against the bigger picture of gaining a huge amount of health data.

For Fitbit, it's a noble exit after putting up a decent fight in the years since the launch of Apple's smartwatch. A Fitbit-Google product could mean Wear OS - Google's wearable operating system - will get a much-needed boost.

I do wonder, though, how Fitbit's 28 million users will feel about this.

Anecdotally, I know several people who have told me that Fitbit's relative autonomy from the tech giants was an incentive to buy their products (though Fitbit has used Google's cloud to support its service since 2018).

By next year, the health data Fitbit has on its users today will become Google's data - a valuable acquisition for Google, undoubtedly, but one that I predict could make consumers uncomfortable.