Abstract-This paper presents an extensive analysis of the integral line-of-sight (ILOS) guidance method for path following tasks of underactuated marine vehicles, operating on and below the sea surface. It is shown that due to the embedded integral action, the guidance law makes the vessels follow straight lines by compensating for the drift effect of environmental disturbances such as currents, wind and waves. The ILOS guidance is first applied to a 2D model of surface vessels that includes the underactauted sway dynamics of the vehicle as well as disturbances in the form of constant irrotational ocean currents and constant dynamic, attitude dependent, forces. The actuated dynamics are not taken into account at this point. A Lyapunov closed loop analysis yields explicit bounds on the guidance law gains to guarantee uniform global asymptotic stability (UGAS) and uniform local exponential stability (ULES).The complete kinematic and dynamic closed loop system of the 3D ILOS guidance law is analyzed next, hence extending the analysis to underactuated AUVs for 3D straight-line path following applications in the presence of constant irrotational ocean currents. The actuated surge, pitch and yaw dynamics are included in the analysis where the closed loop system forms a cascade, and the properties of UGAS and ULES are shown. The 3D ILOS control system is a generalization of the 2D ILOS guidance. Finally, results from simulations and experiments are presented to validate and illustrate the theoretical results, where the 2D ILOS guidance is applied to the CART and the LAUV vehicles.