Spatiotemporal observations in Earth System sciences are often affected by numerous and/or systematically distributed gaps. This data fragmentation is inherited from instrument failures, sparse measurement protocols, or unfavourable conditions (e.g. clouds or vegetation thickness in case of remote-sensing data). Missing values are problematic as they may cause analytic biases and often inhibit advanced statistical analyses. Hence, gapfilling is an undesired but necessary task in Earth System sciences. State-of-the-art gapfilling algorithms based on Singular Spectrum Analysis (SSA) exploit the information contained in periodic temporal patterns to fill gaps in the observations. Here we propose an extension of this method in order to additionally consider the spatial processes and patterns underlying most geoscientific datasets. The latter has been made possible by including a recently developed 2-D-SSA approach. Using both artificial and real-world test data, we show that simultaneously exploiting spatial and temporal patterns improves the gapfilling substantially. We outperform conventional approaches particularly for large and systematically recurring gaps. The new method is reasonably fast and can be applied with a minimum of a priori assumptions regarding the structure of the data and the distribution of gaps. The algorithm is available as a ready-to-use open source software package. © Author(s) 2014.