Agoraphobia is a fear of being in open spaces or crowded situations that make it difficult to escape or receive aid. It often develops as a complication of panic attacks and panic disorder. You may fear having a panic attack at a difficult or embarrassing moment, such as during a big social gathering or traveling on a plane or train. If you have this anxiety disorder, your desire to avoid these types of situations can impair you daily functioning. You might pass up on a job opportunity that requires commuting by train, for example, or decline a social invitation for fear of having a panic attack.