Pulmonary edema is a medical condition characterized by an accumulation of fluid in the alveoli and interstitial spaces of the lungs. This fluid buildup hampers the normal exchange of oxygen and carbon dioxide, leading to respiratory distress. It is often a complication of heart conditions such as congestive heart failure, but can also result from other causes such as trauma, infections, and inhalation of toxins.