Most practical hyperspectral anomaly detection (AD) applications require real-time processing for detecting complex targets from their background. This is especially critical in defense and surveillance domains, but also in many other scenarios, in which a rapid response is mandatory to save human lives. Dealing with such a high dimensionality of data requires the conception of new algorithms to ease the demanding computing performance. Pushbroom scanning represents the mainstream in hyperspectral imaging, introducing added complexity to the equation as there is no information of future pixels. In this paper, a novel technique named line-by-line anomaly detection (LbL-AD) algorithm, is presented as a way of performing real-time processing with a push-broom sensor. The sensor has been mounted on an unmanned aerial vehicle, and the acquired images, together with others from the scientific literature and synthetic ones, have been used to extensively validate the proposed algorithm in terms of accuracy, based on different metrics and processing time. Comparisons with state-of-the-art algorithms were accomplished in order to evaluate the goodness of the LbL-AD, giving as a result an outstanding performance. Index Terms-Anomaly detection (AD), hyperspectral imagery, onboard processing, push-broom sensor, unmanned aerial vehicle (UAV).