Most image dehazing algorithms require, for their operation, the atmospheric light vector, A, which describes the ambient light in the scene. Existing methods either rely on user input or follow error-prone assumptions such as the gray-world assumption. In this paper we present a new automatic method for recovering the atmospheric light vector in hazy scenes given a single input image. The method first recovers the vector's orientation, Â = A//A//, by exploiting the abundance of small image patches in which the scene transmission and surface albedo are approximately constant. We derive a reduced formation model that describes the distribution of the pixels inside such patches as lines in RGB space and show how these lines are used for robustly extracting Â. We show that the magnitude of the atmospheric light vector, kAk, cannot be recovered using patches of constant transmission. We also show that errors in its estimation results in dehazed images that suffer from brightness biases that depend on the transmission level. This dependency implies that the biases are highly-correlated with the scene and are therefore hard to detect via local image analysis. We address this challenging problem by exploiting a global regularity which we observe in hazy images where the intensity level of the brightest pixels is approximately independent of their transmission value. To exploit this property we derive an analytic expression for the dependence that a wrong magnitude introduces and recover kAk by minimizing this particular type of dependence. We validate the assumptions of our method through a number of experiments as well as evaluate the expected accuracy at which our procedure estimates A as function of the transmission in the scene. Results show a more successful recovery of the atmospheric light vector compared to existing procedures.