We describe a Simultaneous Localization and Mapping (SLAM) method for a hovering underwater vehicle that will explore underwater caves and tunnels, a true three dimensional (3D) environment. Our method consists of a Rao-Blackwellized particle filter with a 3D evidence grid map representation. We describe a procedure for dynamically adjusting the number of particles to provide real-time performance. We also describe how we adjust the particle filter prediction step to accommodate sensor degradation or failure. We present an efficient octree data structure which makes it feasible to maintain the hundreds of maps needed by the particle filter to accurately model large environments. This octree structure can exploit spatial locality and temporal shared ancestry between particles to reduce the processing and storage requirements. To test our SLAM method, we utilize data collected with manually-deployed sonar mapping vehicles in the Wakulla Springs cave system in Florida and the Sistema...