Functional magnetic resonance imaging (fMRI) based on blood oxygen level-dependent (BOLD) contrast is widely used for probing brain activity, but its relationship to underlying neural activity remains elusive. Here, we combined fMRI with fiber-optic recordings of fluorescent calcium indicator signals to investigate this relationship in rat somatosensory cortex. Electrical forepaw stimulation (1-10 Hz) evoked fast calcium signals of neuronal origin that showed frequency-dependent adaptation. Additionally, slower calcium signals occurred in astrocyte networks, as verified by astrocyte-specific staining and two-photon microscopy. Without apparent glia activation, we could predict BOLD responses well from simultaneously recorded fiber-optic signals, assuming an impulse response function and taking into account neuronal adaptation. In cases with glia activation, we uncovered additional prolonged BOLD signal components. Our findings highlight the complexity of fMRI BOLD signals, involving both neuronal and glial activity. Combined fMRI and fiber-optic recordings should help to clarify cellular mechanisms underlying BOLD signals.