context: If you have an irregular heartbeat caused by atrial fibrillation ( AFib), you may need surgery to make your heart rhythm normal again. This is called surgical ablation. It's usually a treatment your doctor will try if other things like medications, cardioversion therapy, or catheter ablation have not worked. Most people who have AFib will not need surgical ablation. Your doctor will go into your chest. Once inside she will go into your heart and make small cuts in the tissue. Scars will form. They make a path for electricity in your heart to follow. Your heartbeat will become normal in time. This type of surgery is also called the maze procedure. Different types of maze surgery include: Open-heart maze procedure: If you need valve or bypass surgery for heart disease and also have AFib, your surgeon may perform a maze procedure during your open-heart surgery. Your surgeon will have to break your breastbone, open your chest, and stop your heart to perform this surgery. The doctor will put you on a heart-lung machine to stay alive during this procedure. This is the most common type of surgical ablation. Minimally invasive maze surgery: Many people with AFib can have this type of surgery. It involves small incisions called keyholes so your surgeon can get to your heart. He or she will use energy, either heat or cold, to make form scar tissue on your heart. This procedure can be performed while your heart is still beating. Your surgeon may use a tiny video camera to help see inside your heart while making cuts and scar tissue. Robotically assisted maze surgery: This is a type of minimally invasive maze surgery. Your surgeon may use a robotic tool to help perform ablation. These tools are slightly different from the ones used in minimally invasive surgery. Don't smoke for at least 2 weeks before your heart surgery. It may cause problems with your breathing or blood clotting during or after your procedure. The night before your surgery, bathe or shower. Don't eat after midnight the day before your surgery. Food or drinks in your stomach may cause you to have problems with your anesthesia. It can cause you to vomit and breathe it in. At the hospital, your nurse may test your blood or urine, or perform a chest X-ray to make sure you don't have any infections or problems that may hurt your surgery's success. You may be given a drug to help you relax before the surgery. Electrocardiogram ( EKG) electrodes will be attached to your chest and back to keep track of your heartbeat. You will receive anesthesia to put you to sleep during the surgery. After you are put to sleep, your doctor will connect you to a respirator that has a tube that goes down your throat. This will help you breathe during the operation. You may have a tube inserted into your throat to help collect fluid or air in your stomach during the operation. You may also have a catheter inserted in your bladder to collect urine during the operation. Your surgeon will cut into your chest during your operation, and he or she will insert instruments to make the small interior cuts or make lesions on your heart tissue. Depending on the type of maze procedure you have, your surgeon may use tiny video cameras or robotic arms to help perform the operation. After maze surgery, you will probably have to stay in the intensive care unit of your hospital. After, you may need to stay up to 5 days in a regular hospital room. There the staff will monitor your heartbeat and recovery. After surgery, you may take diuretic drugs. They help control fluid in your body after the surgery. You may also take blood thinners or aspirin to prevent clots. Open-heart surgery will take the longest to recover from. It can take many weeks to heal. If you have a minimally invasive surgical ablation, you may have a quicker recovery than with open-heart surgery. You should be able to leave the hospital in 2 to 4 days. You can go back to normal activity after a few weeks. For about a month after whichever surgery you have, don't take very hot showers. Avoid soaking in a bath or whirlpool tub. Your surgical wounds may itch or feel numb or tight. You may have chest discomfort for a few weeks as your body heals. If you notice signs of infection around your wounds, such as redness, fever, swelling, or heat, call your doctor. It may take a few months for your heartbeat to be normal again after your surgical ablation. Your doctor will monitor your heartbeat to check how you're doing. At first, you'll see her a few weeks after your surgery. Then you will see her for checkups every few months for the first year. You should see her once a year after that.