Gstat is an open source (GPL) computer code for multivariable geostatistical modelling, prediction and simulation. It can calculate sample variograms, fit valid models, show variograms, calculate (pseudo) cross variograms, fit valid linear models of coregionalization (S extension only), and calculate and fit directional variograms and variogram models (anisotropy coefficients are not fitted automatically). Kriging and (sequential) conditional simulation are done under (simplifications of) the universal cokriging model. Any number of variables may be spatially cross-correlated. Each variable may have its own number of trend functions specified (being coordinates, or so-called external drift variables). Simplifications of this model include ordinary and simple kriging, ordinary or simple cokriging, universal kriging, external drift kriging, Gaussian conditional or unconditional simulation or cosimulation. In addition, variables may share trend coefficients (e.g. for collocated cokriging).