A new formulation for detection of false data injection attacks in the smart grid is introduced. The attack detection problem is posed as a statistical learning problem in which the observed measurements are classified as being either attacked or secure. The proposed approach provides an attack detection framework that surmounts over the constraints arising due to the sparse structure of the problem and implicitly exploits any available prior knowledge about the system. Specifically, three supervised learning algorithms are presented. These procedures operate by first observing the power system in order to construct a training dataset which is later used to detect the attacks in new observations. In order to assess the validity of the proposed techniques, the behavior of the proposed algorithms is examined on IEEE test systems.