Ervine pushed the score on comfortably alongside Bailey, punishing the bad balls, before he inside-edged McKerr on to his stumps to depart at 528-5.

Bailey brought up his 150 with a six off Scott Borthwick, but was caught by Mark Footitt on the boundary from the leg-spinner soon afterwards.

Holland's maiden County Championship half-century continued the momentum, while Berg's aggressive 16-ball stay saw him smash three sixes and two fours before being caught on the boundary to prompt the declaration.

Hopes of Hampshire pressing home their advantage appeared to be fading as Stoneman and Rory Burns (45 not out) put on 103 for the first wicket, but Stoneman edged Ervine to Rilee Rossouw at first slip to bring in nightwatchman McKerr to reach the close.