Medtronic PLC published an urgent medical device recall Thursday for nearly 157,000 dual-chamber pacemakers sold worldwide, after discovering a glitch that can cause some devices programmed in certain modes to temporarily lose their ability to pace the heart.

Medtronic is not recommending doctors remove the devices from their patients prophylactically, but in some cases, individual circumstances may warrant a replacement. Medtronic said any unimplanted recalled devices should be returned to the manufacturer.

A pacemaker is an implantable medical device that uses its internal battery to deliver mild electric pulses to the heart’s natural wiring when it is beating too slowly. It’s one of the most common implantable devices in the world, with more than 1 million implants per year worldwide. Thursday’s Medtronic recall affects only “dual-chamber” pacemakers, which deliver pulses to the heart’s upper and lower right chambers to help them beat in proper rhythm.

The recall applies to specific dual-chamber pacemakers under the brand names Adapta, Versa, Sensia, Relia, Attesta, Sphera and Vitatron series A, E, G, and Q. The recall affects devices distributed worldwide between March 10, 2017, and Jan. 7, 2019.

The recall does not affect all models under those brand names and years. To find out whether a specific device is affected, enter the serial number from the patient ID card into the Medtronic portal at wwwp.medtronic.com/ productperformance/.

Even if a device is covered by the recall, it’s only vulnerable to the glitch if programmed to one of 12 different modes that are susceptible, which are described in depth in Medtronic’s recall notice online.

For many patients, the issue can be resolved temporarily by having a doctor program the device to one of 15 modes that are not susceptible to the problem. Those patients should then be protected from the issue until a software patch is issued, which will be available after Medtronic submits the software to regulators for approval in the second half of this year.

For patients who can’t tolerate any of the programming modes not susceptible to the glitch, and are at risk for a problem occurring in their device, the recall notice says patients and doctors may consider device replacement.

Medtronic estimates the per-patient mortality risk due to the problem is 0.021 percent over the time until the software update is available. That level of risk is comparable to Medtronic’s estimated per-patient mortality risk from device-replacement surgery, which is 0.027 percent.

Patients who remain in one of the modes susceptible to malfunction should seek immediate medical attention if they feel new or unexpected symptoms consistent with their pacemaker not working.

So far, temporary pauses in pacing have been reported in four cases, involving two patients, out of 156,957 devices sold, including 12,000 in the U.S. The company estimates that on average, devices in susceptible pacing modes have a 2.8 percent chance per month of having a pause in pacing that lasts 1.5 seconds or longer.

Medtronic said the root cause of the problem is related to a design change in an integrated circuit in a subset of the dual-chamber devices sold between the dates listed above.