  We here present the results of an analysis of the optical spectroscopy of 42
globular cluster (GC) candidates in the nearby spiral galaxy M81 (3.61~Mpc).
The spectra were obtained using the long-slit and MOS modes of the OSIRIS
instrument at the 10.4~m Gran Telescopio Canarias (GTC) at a spectral
resolution of $\sim$1000. We used the classical H$\beta$ vs [MgFe]$'$ index
diagram to separate genuine old GCs from clusters younger than 3 Gyr. Of the 30
spectra with continuum signal-to-noise ratio $>10$, we confirm 17 objects to be
classical GCs (age $>10$~Gyr, $-1.4<$[Fe/H]$<-$0.4), with the remaining 13
being intermediate-age clusters (1-7.5~Gyr). We combined age and metallicity
data of other nearby spiral galaxies ($\lesssim18$~Mpc) obtained using similar
methodology like the one we have used here to understand the origin of GCs in
spiral galaxies in the cosmological context. We find that the metal-poor
([Fe/H]<$-$1) GCs continued to form up to 6~Gyr after the first GCs were
formed, with all younger systems (age $<8$~Gyr) being metal-rich.
