Bayer announced on Friday that it would discontinue sales of its Essure birth control implant by the end of the year, bowing to a lengthy campaign by health advocates and thousands of women to get the device off the market.

The implant has had a troubled history. It has been the subject of an estimated 16,000 lawsuits or claims filed by women who reported severe injuries, including perforation of the uterus and the fallopian tubes. Several deaths, including of a few infants, have also been attributed to the device or to complications from it.

Bayer said its decision to halt sales of the device was not related to the litigation or safety issues, but to a decline in use as women chose other options. Bayer has repeatedly denied that the implant is dangerous or caused injuries.

Women who had filed injury claims and advocacy groups, including one called Essure Problems that had 36,000 members on Facebook, had repeatedly demanded that the Food and Drug Administration ban the device. But the agency declined.