We simulate the despinning of Mercury, with or without a fluid core, and with a frequency-dependent tidal model employed. The tidal model incorporates the viscoelastic (Maxwell) rebound at low frequencies and a predominantly inelastic (Andrade) creep at higher frequencies. It is combined with a statistically relevant set of histories of Mercury's eccentricity. The tidal model has a dramatic influence on the behaviour of spin histories near spin-orbit resonances. The probabilities of capture into high-order resonances are greatly enhanced. Exploring several scenarios, we conclude that the present 3:2 spin state was achieved by entrapment of an initially prograde cold Mercury when its age was less than 20 Myr, i.e., well before differentiation.