Autonomous Underwater Vehicles (AUVs) operate in unknown underwater environments and take decisions based on sensor readings, without any link with a human operator. It is critical for the AUVs to be able to avoid submerged obstacles and to adapt to changes in the ocean floor terrain. A typical mission for an AUV is to inspect a given area using a side scan. It is crucial to maintain a straight line course during the inspection in order to ensure proper side scan sonar operation. This limits the obstacle avoidance to only the vertical plane. In this study, a real-time obstacle detection and avoidance algorithm that uses vertical plane oriented forward looking sonar is outlined. Experimental results that demonstrate the performance of the proposed method are presented.