The Generalized Space-Time Autoregressive Integrated Moving Average (GSTARIMA) is a model used to model time series data that exhibits spatial dependencies among its locations as well as temporal dependencies. GSTARIMA is applied in various economic contexts, including analyzing exports and imports, exchange rates, production, inflation, and rainfall. This research aims to develop the best GSTARIMA model and utilize it to forecast rainfall in the Medan Belawan District. The GSTARIMA model combines temporal and geographical aspects by adjusting parameters for each observed location. The data used in this study consists of monthly rainfall data for the Medan Belawan District, obtained from the Maritime Class II Meteorological Station in Belawan, spanning from January 2020 to December 2022. The identification of Autoregressive (AR) and Moving Average (MA) orders was performed through the analysis of the Autocorrelation Matrix (MACF) and Partial Autocorrelation Matrix (MPACF). This study employed a spatial order of 1, along with an inverse distance weighting matrix and cross-correlation normalization. Parameter estimation used the generalized least squares (GLS) method. The research results indicate that the GSTARIMA model (2,0,0) with the inverse distance weighting matrix achieved the lowest Mean Absolute Percentage Error (MAPE) rate, specifically at 1.0170. Thus, this model is considered the best for forecasting rainfall in the Medan Belawan District.