LaCoO3 displays two broad anomalies in the DC magnetic susceptibility chi(DC), occurring, respectively, around 50 K and 500 K. We have investigated the first of them within the 10 K < T < RT temperature range using Co K alpha(1) x-ray absorption spectroscopy (XAS) in the partial fluorescence yield mode. In contrast with previous O K-edge XAS reports, our data show the existence of abrupt changes around 50 K which can be nicely correlated with the anomaly in chi(DC). To our knowledge, this is the first time that a clear, quantitative relationship between the temperature dependence of the magnetic susceptibility and that of the XAS spectra is reported. The intensity changes in the preedge region, which are consistent with a transition from a lower to a higher spin state, have been analyzed using a minimal model including the Co 3d and O 2p hybridization in the initial state. The temperature dependence of the Co magnetic moment obtained from the estimated e(g) and t(2g) occupations could be satisfactorily reproduced. Also, the decrease of the Co 3d and O 2p hybridization by increasing temperature obtained from this simple model compares favorably with the values estimated from thermal evolution of the crystallographic structure.