When a 27-year-old woman who was recently diagnosed with type 1 diabetes arrived for her first appointment, one question weighed on her mind: Will I be able to carry a healthy pregnancy?

The diagnosis of type 1 diabetes had blindsided her — she was recently married and had chalked up her weight loss and fatigue to the stress of wedding planning. Now, after being healthy her entire life, she required multiple insulin injections and needed to test her blood sugar four times a day. Beyond that, she was concerned that the diagnosis would affect her ability to conceive. Google searches only heightened her anxiety, as some online sources mentioned that it carries an extremely high risk and may, in fact, be inadvisable.

So, we had a lot to talk about.

There are three different types of diabetes that can affect pregnant women, and all types are increasing in incidence. By far, the most common is gestational diabetes, defined as glucose intolerance first noticed during pregnancy. Most women are diagnosed with this condition in the beginning of the third trimester, when they are screened by their obstetrician. Although some women require insulin treatment, the condition can be well-controlled with lifestyle changes alone, as medical nutritional therapy is the mainstay of treatment. The most common risk of uncontrolled gestational diabetes is a large baby, and a higher risk of C-section to avoid neonatal injury.

The two other types, affecting significantly fewer women (about 1 in 250 pregnancies), are type 1 and type 2 diabetes. Type 1 diabetes is an autoimmune disease that leads to a complete deficiency in insulin, requiring full insulin replacement. Type 2 diabetes is more complicated in cause, being an interplay of multiple genes and lifestyle factors. It can be treated with oral medications outside of pregnancy, but insulin is deemed the safest treatment during pregnancy.

Women with type 1 and type 2 diabetes are considered to be at higher risk than women diagnosed with gestational diabetes for two main reasons. First, women may have complications from their preexisting diabetes that can affect their organs, such as their eyes, kidneys and vascular systems. This not only may lead to more severe diabetes-related complications, but can also increase one’s risk of preterm delivery and preeclampsia, a condition characterized by high blood pressure.

Second, high glucose or blood sugar itself is a teratogen, meaning that high blood sugar can cause birth defects. For example, women who have uncontrolled diabetes during the first trimester can have babies with cardiac problems, and problems with limbs being fully formed. High blood sugar in the second and third trimesters can lead to large babies and preterm deliveries. To reduce the risk of any complications to the mother or baby, blood sugars need to be even more tightly controlled than we recommend outside of pregnancy.

Where this can become tricky is that not all women know they have diabetes before they become pregnant and tight control is so crucial in those first few weeks. Women of childbearing age typically do not have frequent physicals in which blood sugars are checked. In fact, yearly testing in low risk groups at a young age is not typically indicated. As a result, diabetes in pregnancy has become a public health concern, in that pregnant women unknowingly may have diabetes that preceded the pregnancy.

So to answer my patient’s question: Is having a baby a higher risk endeavor? Yes. Is it possible to have a healthy pregnancy and safe delivery as a mother with diabetes? Most certainly.

The thought of nine months of intensive blood sugar monitoring and multiple daily insulin injections can be daunting. What can be comforting to a pregnant woman with diabetes is that she has a comprehensive support team, comprised of an obstetrician, an endocrinologist, a dietician and/ or certified diabetes educator, ophthalmologist and diabetes nurses and nurse practitioners. We recommend that our patients communicate their glucose trends weekly and visit us at least monthly. In addition, patients need to see their obstetrician regularly and later two times a week, starting at the 32-week mark.

Today, more resources are available to help women monitor their blood sugars. For example, continuous glucose monitors provide very accurate readings that can be delivered to smart phones or smart watches, with audible alerts for both high and low blood sugars. Insulin pumps can automatically stop delivering insulin when the sensors read the blood sugar as low. I tell my patients that blood sugar control in pregnancy is like walking a tight rope, and the sensor acts as a guide to keep them on course.

Women who have type 1 or type 2 diabetes or prior gestational diabetes are encouraged to discuss plans for future conception with their gynecologists and endocrinologists at their routine visits. Making sure blood sugars are at target prior to conception in addition to optimal management during pregnancy helps bring the risk of pregnancy down to that of the general population.

My patient is in her third trimester and is doing very well. Managing her diabetes during pregnancy is hard work, but she is progressing well, with all monitoring thus far very reassuring. She has elected not to find out the gender of her baby prior to her delivery — surprise she is looking forward to.

Carrie M. Burns, M.D., is an associate professor of clinical medicine in the Division of Endocrinology, Diabetes and Metabolism at Penn Medicine.