context: Pulmonary edema means you have fluid building up in your lungs. That can make it hard for you to breathe. Normally when you take a breath, your lungs fill with air. If you have pulmonary edema, they fill with fluid instead. When that happens, oxygen from the air can't get from the lungs into the blood where it's needed. When it comes on suddenly it's called acute pulmonary edema, and can it be life threatening. If you have any of these symptoms, call 911 right away: Sudden shortness of breath Trouble breathing with a lot of sweating Breathing that sounds bubbly or like wheezing or gasping Coughing up pink, frothy spit Skin that looks blue or gray Feeling lightheaded, dizzy, weak, or sweaty, which can signal a drop in blood pressure Don't delay. You need immediate medical care. When the problem happens over time, it's called chronic pulmonary edema. You may: Be tired Gain weight rapidly (this may be a sign of fluid buildup and congestive heart failure) Have more breathing problems than usual during physical activity Have swollen legs and feet Have trouble breathing when lying down Wake up at night with a breathless feeling that gets better if you sit up Wheeze Pulmonary edema is usually caused by a problem with the heart. This is called cardiogenic pulmonary edema. In many cases, the left ventricle (one of the chambers of the heart) isn't able to pump out blood that enters through blood vessels coming from the lung. The poor pumping creates a buildup of pressure and fluid. Narrow arteries, heart muscle damage, heart valve problems, and high blood pressure are among the conditions that can weaken the left ventricle. Pulmonary edema isn't always related to heart problems. Other causes include: A condition called ARDS, or acute respiratory distress syndrome Blood clots Exposure to ammonia, chlorine, or other toxins Inhaling smoke that contains certain chemicals Injury or trauma to the brain or nervous system Lung injury after removal of blood clots Near-drowning incidents Reaction to some drugs Viral infections Pulmonary edema also can be brought on from being in high altitudes, usually above 8,000 feet. Mountain climbers should get to lower ground and seek medical attention if they have: Chest discomfort Cough Cough with frothy spit that may have some blood in it Fast, irregular heartbeat Fever Headache Shortness of breath when they're active that gets worse over time Trouble walking uphill that leads to trouble walking on a flat surface To help the doctor find out what's going on, you may need to: Answer questions about your medical history Have a physical exam Get a chest X-ray so the doctor can study your heart and lungs Have heart tests to measure how well your heart beats Have a blood test to find out how much oxygen and carbon dioxide are in your blood If you're having trouble breathing, you'll get oxygen right away if your oxygen level is low. You may get it through a facemask, or with tubes put inside your nostrils. Your treatment will depend on what's causing your pulmonary edema. Whether it's your heart, medication, or an illness, your doctor will try to deal with the problem that brought it on. The doctor may prescribe medicine such as a diuretic to lower the pressure on your heart and lungs. He or she also may recommend some lifestyle changes to help keep the pulmonary edema in check, including: Eating plenty of vegetables, fruits, and whole grains Eating less salt Getting regular exercise Quitting smoking if you smoke Losing weight if you have extra pounds