Although many localization protocols have been proposed for terrestrial sensor networks in recent years, the unique characteristics of the underwater acoustic communication channel, such as high and variable propagation delay and the three dimensional volume of the environment make it necessary to design and develop new localization algorithms. In this paper, a localization algorithm called Three-Dimensional Underwater Localization (3DUL) is introduced. 3DUL achieves network-wide robust 3D localization by using a distributed and iterative algorithm. Most importantly, 3DUL exploits only three surface buoys for localization initially. The sensor nodes leverage the low speed of sound to accurately determine the inter-node distances. Performance evaluations show that 3DUL algorithm provides high accuracy in underwater localization, which does not degrade with network size.