Surrey 145 and 263 for 3 (Smith 114, Sibley 61*, Latham 58) need a further 238 runs to beat Kent 301 and 344 (Qadri 72, Clark 5-79)
A brilliant century by Jamie Smith has given Surrey stand a chance of making history in the LV= Insurance County Championship: they need another 238 for victory against Kent and what would be their highest-ever run chase.
The Division One leaders were 263 for 3 at stumps and more than halfway to their target, with Dom Sibley on 61 not out and Ben Foakes unbeaten on 22, after Smith made 114 and Tom Latham 58.
Kent were all out for 344 just before lunch, a lead of exactly 500. Jordan Clark took 5 for 79, but only after Hamid Qadri had hit a highly entertaining 72 and put on 117 in a crucial stand with Joey Evison that looked to have batted Surrey out of the game.
However, having lost just two wickets in the last two sessions Surrey stand an excellent chance of overhauling their previous highest run chase, which was against Kent at this venue in 2002 when they finished on 410 for 8.
Surrey began a pulsating third day with hopes of getting Kent's final four wickets cheaply, but Qadri, who had looked like he might get out with every delivery on Monday evening, was enjoying what's known on the circuit as a "day out". He survived a dicey early spell, smacked Sean Abbott for six over cow corner and brought up his fifty with a heave past the bowler, Gus Atkinson, for four.
By the time Clark took three wickets for no runs in the space of five balls, Kent's lead was already 445 and the seventh-wicket stand that exasperated Surrey only came to an end when Evison was caught by Smith off Clark for 42.
Clark then bowled Wes Agar, promoted up the order, for a second-ball duck and Qadri's fun finally ended when he hit the same bowler to Jacks on the boundary, but the last-wicket pair of Arshdeep Singh and Matt Quinn then put on a further 53. Arshdeep hit fours off his first two balls and Quinn then hit 37 from 22 balls, including three sixes before Clark bowled him.
Just as it looked like Surrey's morning couldn't get any worse, in the two over mini-session before lunch Rory Burns managed to hit the first ball for four before edging the second to Jack Leaning at second slip and Latham was nearly run out. He survived by an inch and the let off seemed to remind Surrey of the discipline they'd need as he and Sibley batted through the entire afternoon.
They only looked vulnerable when Qadri came on, but his earlier luck deserted him as he had Latham dropped twice, by Ben Compton and Agar, in the space of two overs.
He finally got his man when Daniel Bell-Drummond took a diving catch at mid-on shortly after tea but while Sibley continued to score steadily Smith then started flaying the bowlers. He was on 77 when he cut Quinn and Compton couldn't hold a difficult catch and he reached three figures from 70 balls when he smashed Joe Denly's first ball for six over long-on.
A wave of relief went round the ground when Arshdeep sent his off stump flying to end a stand of 138 but with Ben Foakes joining Sibley and taking eight off the final over it left Kent members with long memories fearing something even worse than their defeat 21 years ago, when Ian Ward and Jimmy Ormond put on 97 for the eighth wicket to steer Surrey home by two wickets.