Sussex go into the final day of their Vitality County Championship match against Derbyshire as clear favourites to extend their lead in the second division with their sixth victory of the season.
But some resolute batting by the Derbyshire batsmen second time round has given them an outside chance of saving the game. In their first innings Derbyshire had been 24 for four in reply to the massive Sussex score of 607 for seven.
But after being asked to follow on, 317 runs behind, they ended the third day on 141 for two, still 176 behind.
Openers Harry Came and Luis Reece dropped anchor with a first wicket stand of 46 in 23.4 overs as they saw off the opening burst from Ollie Robinson and Jaydev Unadkat with the Kookaburra ball.
At 29-0 after 16 overs the Sussex captain John Simpson – who was influenced by the fading light – switched to his spinners.
And it was James Coles to made the breakthrough in the 24th over when Reece, sweeping, was caught by Fynn Hudson-Prentice at deep backward square-leg for an 88-ball 27.
At 47-1, just before tea, the players went off for bad light, and were off the field for an hour.
But tea was taken and ultimately only four overs were lost. When play was resumed Guest was more positive, striking three fours and sweeping Carson for six before he fell lbw on the back foot to the Sussex spinner.
But then Came (54) and first innings batting hero Madsen (31) defied the Sussex attack with an unbroken half-century third wicket stand.
In an extended morning session, Derbyshire had been bowled out for 290, having started the day on 178 for six, still a massive 429 runs behind.
Madsen, resuming on 79, scored 138, his 38th first-class century and his fourth against Sussex.
He faced 210 deliveries, striking 21 fours and three sixes.
Off-spinner Jack Carson, following his nine wickets in the previous match against Yorkshire, had figures of five for 90, becoming the first Sussex spinner to return a five-for against Derbyshire since Chris Waller in 1985.
Zak Chappell was first out, lbw to Carson for 25 as he attempted to slog-sweep, having added 54 with Madsen. Jack Morley was less obdurate, losing his middle stump to one that turned sharply from Carson for a seven-ball duck.
But Madsen found another ally in Daryn Dupavillon, the pair adding 47 for the ninth wicket.
Madsen decided to take the attack to Carson, hitting him for 16 from three deliveries, with successive leg-side sixes, before hoisting the bowler to deep mid-wicket.
Dupavillon was last out, having hit three fours and two sixes in his 54-ball 28. He was bowled by Henry Crocombe, and wicketkeeper Simpson had to take avoiding action action as the ball ricocheted off the stumps.
Report Provided by ECB Reporter's Network
Reaction from Paul Farbrace at stumps on day three