Mark Ramprakash fell agonisingly short of another century and a thousand runs for the season as Derbyshire's bowlers hit back after tea at Chesterfield.

The former England batsman was out for 99 for only the fourth time in his 23-year career, although the crowd at Queen's Park thought he had scored his 112th first-class hundred.

Ramprakash raised his bat to acknowledge the applause when he drove Tim Groenewald for his ninth four, but the scoreboard had made a mistake and he was only on 95.

That proved to be an embarrassing error because he got an inside edge into his stumps in Groenewald's next over and walked off 41 short of 1,000 runs for the season.

Groenewald became the first Derbyshire bowler this season to take five wickets in an innings as Surrey closed on 364 for nine.

Surrey looked to be on course for a big total when Ramprakash and Usman Afzaal shared a fourth-wicket stand of 141 in 39 overs, but Groenewald dismissed them both in the space of four overs.

Groenewald deserved his success on a pitch which offered little for the bowlers, although the Derbyshire attack was too inconsistent in the morning after Surrey had won the toss.

Rory Hamilton-Brown hit the wayward Tom Lungley out of the attack, taking four boundaries from the seamer's second over, but the Surrey skipper played one attacking shot too many.

He had raced to 24 off 16 balls when he aimed a cut at Steffan Jones and Derbyshire captain Chris Rogers juggled with the ball before taking the catch at first slip.

Arun Harinath unleashed some handsome off drives before he played down the wrong line at Groenewald and was lbw for 16 with the score on 48.

That was the home side's last success before lunch as Ramprakash and Younis Khan settled in ominously and it was a surprise when the Pakistan batsman went in the first over after the interval.

He had moved smoothly to 45 when Jones found some late movement and bounce to have him caught behind, and the runs dried up with Ramprakash scoring only seven in the first 19 overs of the afternoon session.

He broke free by driving Robin Peterson into the sightscreen for six to bring up his fifty and Afzaal emerged from an uncertain start to reach his half century with a pulled six off the medium pace of Garry Park.

The pair were batting Surrey into a strong position when Groenewald moved one across Afzaal to have him caught at second slip for 73, starting a slide in which the visitors lost five wickets for 65 in 18 overs.

Stewart Walters steered Surrey to a fourth batting point with his first Championship half century of the season but Groenewald had him caught low down at second slip for 53 in the penultimate over to finish with five for 75.