FitBit Inc.’s heart monitoring devices are called “wildly inaccurate” in a lawsuit accusing the company of false advertising.

Devices sold by the leading maker of fitness trackers “are mis-recording heart rates by a very significant margin” while on the brink of causing health risks for users, according to a complaint filed Tuesday in San Francisco federal court.

A Colorado woman alleges that her Charge HR device under- reported her actual heart rate by 50 percent, as recorded manually by her personal trainer after a period of intense exercise.

“Scores of customer complaints confirm these are not isolated incidents,” according to to the complaint, which was brought as a class action on behalf of other customers.

FitBit defended its products, pointing to internal studies verifying their accuracy.

“We do not believe this case has merit,” Heather Pierce, a spokeswoman for the company, said in an e-mail. “Fitbit stands behind our heart rate technology and strongly disagrees with the statements made in the complaint and plans to vigorously defend the lawsuit.”

Fitbit, which had an initial public offering in June, remains the top seller of wearables, though its market share tumbled to 22 percent in the third quarter of 2015 from 33 percent a year earlier, according to IDC. While rising competition may continue to chip away at its lead, analysts say design is more likely to determine consumer behavior than technology.

The case is McLellan v. FitBit Inc., 16-cv-00036, U.S. District Court, Northern District of California (San Francisco).

–With assistance from Selina Wang.