Ollie Robinson and Tawanda Muyeye gave Kent hope of pipping Middlesex to the Division Three title on day three of their match at Canterbury.
Chasing 373 to win, the pair put on a stand of 172 for the fifth wicket.
But Robinson fell for 112 to the final ball of the day to leave Kent 275-5, with Muyeye unbeaten on 76.
Elsewhere, Worcestershire beat Leicestershire by 10 wickets and Derbyshire wrapped up a nine-wicket triumph at Sussex.
For Derbyshire, it was a first Championship victory of the season as they consigned Sussex to bottom place for the first time in 21 years.
In Division Two, Jamie Smith hit a career-best 138 as Surrey batted through the day against Glamorgan.
Surrey resumed on 45-0 and chipped away at Glamorgan’s massive 672-6 declared on a flat track at the Kia Oval, in a match which seems destined for a draw.
Ryan Patel fell for 62 in the morning to bring an opening stand of 140 to an end, and Smith passed his century after lunch with support from Hashim Amla.
Smith surpassed his previous best of 127 before he edged Eddie Byrom (2-52) behind, but Ollie Pope (95 not out) and Amla (87 not out) had added 140 for the third wicket by the time Surrey closed on 387-2.
The visitors had spurned chances to put Surrey’s top order under more pressure, with Patel dropped on 33, Smith put down on 53 and Amla on 61, 79 and 87.
Kent battled their way into contention for the title, but the late loss of Robinson after Middlesex took the new ball for the final over leaves their contest well poised heading into day four.
John Simpson’s 46 and a contribution of 25 from Ethan Bamber helped Middlesex go from their overnight score of 298-6 to 363 all out, as Matt Milnes finished with 5-87.
Kent’s chase got off to a stuttering start as they slipped to 69-3, but Zak Crawley’s 47 gave them a platform before he was trapped lbw by Toby Roland-Jones.
Robinson and Muyeye then took the fight to the visitors, with Muyeye reaching his highest first-class score of 76 not out at stumps.
Yet Tim Murtagh’s dramatic late breakthrough gave the Irishman his 899th first-class wicket when Robinson edged behind, although veteran all-rounder Darren Stevens will relish chasing down the 98 runs required for victory when he joins Muyeye at the crease.
Worcestershire clinched a convincing win over Leicestershire at New Road despite some resistance from the Foxes’ middle-order.
After the hosts resumed on 378-6 in their first innings, Ed Barnard fell two runs short of his half-century when he was caught behind off Chris Wright.
Ben Cox moved from 52 to 59 before he edged Abi Sakande through to the keeper, and Sakande took the final two wickets to end with 3-66 as the Pears were dismissed for 422.
That gave Worcestershire a lead of 200 runs, and Leicestershire fell to 35-4 in their second innings.
A career-best 90 from George Rhodes and Ben Mike’s 58 enabled the visitors to avoid an innings defeat but they were all out for 211 and Worcestershire knocked off the target of 12 runs in quick time.
At Hove, Sussex set a unwanted record in defeat, recording the highest first-class score in an innings containing at least six ducks as they were bowled out for 300 in their first innings.
Ben Brown added seven runs to his overnight total of 150 and Matthew Critchley wrapped up their first innings as Henry Crocombe, Sean Hunt and Jamie Atkins all departed without scoring, with Jack Carson ending unbeaten on 64.
Sussex, still trailing Derbyshire’s first-innings score by 165 runs, were asked to follow-on and went from 43-0 at lunch to 51-3 as both openers departed either side of Brown going for a duck.
Delray Rawlins top-scored with 58 as the hosts were eventually bowled out for 187, and Derbyshire rattled off the 23 runs required to win for the loss of one wicket.
Day three scoreboards
Kia Oval: Glamorgan 672-6 dec (C Cooke 205*, Lloyd 121, Carlson 69, J Cooke 68, Douthwaite 59) v Surrey 387-2 (Smith 138, Pope 95*, Amla 87*, Patel 62; Byrom 2-52)
Canterbury: Middlesex 147 (Stoneman 59; Stevens 4-21) & 363 (Stoneman 109; Milnes 5-87) v Kent 138 (Muyeye 30; Bamber 3-36) & 275-5 (Robinson 112, Muyeye 76*).
Worcester: Leicestershire 222 (Kimber 71; Leach 3-38) & 211 (Rhodes 90, Mike 58; Leach 3-25) v Worcestershire 422 (Libby 77, Cox 59 Morris 50) & 12-0. Worcestershire won by 10 wickets.
Hove: Derbyshire 465 (Madsen 111, Critchley 85, Godleman 52) & 23-1 v Sussex 300 (Brown 157, Carson 64*, Carter 51; Aitchison 4-80) & 187 (follow-on) (Rawlins 58; Madsen 2-8). Derbyshire won by nine wickets.