We propose a novel boundary-following algorithm that works in conjunction with any potential function that is guaranteed to take the robot to the target. The potential field must not have any local minima but is not required to avoid moving too closely to the boundary. The proposed method has several advantages: a) The calculation of the C-space is avoided, which can be costly especially if the robot has the ability of rotation; b) the safety distance, which is the distance from the robot to the closest obstacle's boundary, is controllable and adaptive; c) the resulting path is quasi-optimal in the sense that it is approximates the shortest path, given the safety distance constraints. The proposed boundary following algorithm is guided by the potential field at critical handoff points where the robot switches from one mode of navigation (e.g., following a wall) to another (e.g., following the potential field). The method adjusts its behavior according to the degree of clutter, i.e. the number of interacting boundaries. The proposed method was simulated extensively for different safety distances, and different starting points.