Derbyshire 198 and 40 for 1 need a further 361 runs to beat Glamorgan 237 and 361 for 7 dec (Cooke 126*, Harris 61*, Ingram 51, Thomson 5-136)
Glamorgan pulled in front on day three of their Vitality County Championship match against Derbyshire after they posted 361 for seven declared to set a target of 401 for the visitors.
The mainstay for Glamorgan was Chris Cooke who finished on 126 not out, by far the highest score of this match so far. He was well supported by 61 not out from James Harris and a well made 32 from Dan Douthwaite.
In the 12 overs that were bowled before the close Derbyshire reached 40 for one with David Lloyd and Luis Reece undefeated.
With Derbyshire still 361 runs away from their victory target a Glamorgan victory is the most likely outcome as the match heads into a final day with a mixed weather forecast.
Mason Crane had come into bat as a nightwatchman late on day two and he did a good job of supporting Colin Ingram in a 45-run stand for the fifth wicket. Crane was trapped lbw by Thomson for 19 to bring the experienced pair of Ingram and Cooke together. For the first time in this match, batting started looking straightforward.
Ingram was batting with great rhythm as he passed fifty from 76 balls. Shortly after reaching the milestone, he called Cooke through for a single and was sent back too late and was run out by a throw from Sam Conners.
In the first two innings of the match, it was at this point that wickets had come in a hurry. Here Cooke and Douthwaite put together a partnership worth 109, the highest of the match up to that point. Cooke missed out on a chance to bat during the record-breaking efforts at Lord's last week and he made the most of his chance in the middle in this game as he made the 13th hundred of his first-class career.
After seeing the ball spin appreciably throughout the first two days, it was a lot easier going on day three, but Thomson continued to be a threat. He bowled the first 33 overs of the Glamorgan innings from the River Taff end and sent down 44 overs in total as he finished with career-best match figures of 12 for 201.
Cooke was joined by Harris after Douthwaite was dismissed by Thomson to complete his second five-wicket haul of the match and Glamorgan continued to turn the screw with a second hundred-run stand in succession, eclipsing the stand by Cooke and Douthwaite as they made 116 undefeated for the eighth wicket. When the declaration came it set Derbyshire a target of 401.
Harris was the man to make the one breakthrough on the third evening when he had Harry Came trapped lbw for three. As the clouds came over Sophia Gardens in the early evening it became too dark for play to continue and the players left the field with three overs unbowled.
With the ball still turning on this pitch much will depend on how well Crane bowls on the final day with Glamorgan still needing nine wickets for victory.