Before having a pacemaker fitted, you'll have a preoperative assessment.
The team looking after you will check you're fit for surgery. You can discuss the operation and ask any questions at the assessment.
Tests such as blood tests and X-rays can be arranged at this stage so there are no delays when you're called into hospital.
You'll be asked about your general health and heart problems, and how they affect you.
You'll also be asked about any additional medical problems and previous operations you've had, as well as any problems or reactions you or your family have had with anaesthetics.
Taking steps to improve your health and fitness, such as stopping smoking if you smoke, eating a healthy diet and exercising regularly, should help speed up your recovery time and reduce the risk of complications.
You'll usually be told when you have to stop eating or drinking before surgery during the preoperative assessment.
Read more about preparing for surgery.
The pacemaker implantation will be carried out by a heart specialist, known as a cardiologist, who will probably have a special interest in pacemakers.
If you're being treated in a large heart hospital, the operation will often be carried out by an electrophysiologist. This is a cardiologist who specialises in heart rhythm disorders.
Fitting the pacemaker
Transvenous implantation is the most common method of fitting a pacemaker or an implantable cardioverter defibrillator (ICD).
During transvenous implantation, the cardiologist will make a 5-6cm (about two inch) cut just below your collarbone, usually on the left side of the chest, and insert the wires of the pacemaker (pacing leads) into a vein.
The pacing leads are guided along the vein into the correct chamber of your heart using X-ray scans. They then become lodged in the tissue of your heart.
The other ends of the leads are connected to the pacemaker, which is fitted into a small pocket created by the cardiologist between the skin of your upper chest and your chest muscle.
Transvenous implantation is carried out under local anaesthetic, which is given as an injection. This means the area where the cuts are made is numbed, but you remain conscious during the procedure.
You'll feel an initial burning or pricking sensation when the cardiologist injects the local anaesthetic. The area will soon become numb, but you may feel a pulling sensation during the operation.
Before the procedure, a thin tube called an intravenous (IV) line will be attached to one of your veins. Medication to make you drowsy will be given through the IV line to keep you relaxed during the procedure.
The procedure usually takes about an hour, but it may take longer if you're having a biventricular pacemaker with three leads fitted or other heart surgery at the same time. You'll usually need to stay in hospital overnight and have a day's rest after the procedure.
Read more about recovering from a pacemaker implantation.
Epicardial implantation is an alternative and less widely used method of fitting a pacemaker.
In this method, the pacing lead or leads are attached to the outer surface of your heart (epicardium) through a cut in your abdomen, below the chest.
Epicardial implantation is often used in children and people who have heart surgery at the same time as a pacemaker implantation. It is carried out under general anaesthetic, which means you'll be unconscious throughout the procedure.
The surgeon will attach the tip of the pacing lead to your heart and the other end of the lead is attached to the pacemaker box. This is usually placed in a pocket created under the skin in your abdomen.
The procedure usually takes between one and two hours, but it can take longer if you're having other heart surgery at the same time.
Recovery after epicardial implantation usually takes longer than after transvenous implantation.
Implantable cardioverter defibrillators (ICDs)
In most cases, implantable cardioverter defibrillators (ICDs) are fitted transvenously, along a vein. However, they can also be fitted under the skin (subcutaneously).
Subcutaneous implantation is either carried out using general anaesthesia, or with local anaesthesia and sedation. During the procedure, a pocket will be created in the left side of the chest where the ICD will be positioned.
The pacing lead and electrodes are also placed under the skin along the breast bone and are connected to the device.
After the cuts have been closed, the sensing, pacing and recording functions of the ICD will be tested and adjusted.
It can take as little as one hour, or up to three or more hours, for an ICD to be inserted, depending on the type of device you're having fitted. An overnight stay in hospital is often, although not always, required.
Testing and setting the pacemaker
Once the leads are in place, but before they're connected to the pacemaker or ICD, the cardiologist will test them to make sure they work properly and can increase your heart rate. This is called pacing.
Small amounts of energy are delivered through the leads into the heart, which cause it to contract and pull inwards.
When the leads are being tested, you may feel your heart beat faster. Tell the medical team about any symptoms you feel.
Your doctor will determine the settings of your pacemaker after deciding how much electrical energy is needed to stimulate your heartbeat.