Kent 138 (Bamber 3-36, Andersson 3-44) and 375 for 8 (Robinson 112, Muyeye 89) beat Middlesex 147 (Stoneman 59, Stevens 4-21) and 363 (Stoneman 109, Milnes 5-87) by two wickets
Kent have won the LV= Insurance County Championship Division Three title after a morning of high drama at Canterbury, where they beat Middlesex by two wickets.
Kent finished on 375 for 8, but they were in trouble early after Toby Roland-Jones brilliantly ran out Tawanda Muyeye for 89.
They also lost Darren Stevens for 14, before Marcus O'Riordan and Grant Stewart revived them with a stand of 48 and Matt Milnes hit the winning runs.
Kent began the fourth day on 275 for 5, needing another 98 to win and as the batsmen walked out a member in the Knott-Underwood stand yelled: "You were seeing it like a football yesterday TS, good luck," at Muyeye.
Middlesex had dragged themselves back into a game that had been drifting away from them when Tim Murtagh had dismissed centurion Ollie Robinson with the final ball on day three. But Kent made steady progress at the start and added 20 runs before Muyeye chased a single and was halfway down the pitch when he was sent back by Stevens and run out by a direct hit from Roland-Jones, who had barely a stump to aim at.
A visibly distraught Muyeye trudged back to the pavilion and Stevens was then caught by a diving Sam Robson at second slip, after edging Roland-Jones.
At that point Kent were 310 for 7 but O'Riordan and Stewart took them to within 16 of victory when the former edged Martin Andersson for 26 and was caught at second slip by Robson.
As the tension mounted, Kent scrambled a single and a shy at the stumps went for four overthrows. Stewart survived a loud appeal for caught behind off Andersson and hit the next ball for four to reduce the target to two.
Kent secured the title when Milnes steered Roland-Jones to third man, giving them 19 points and Middlesex three, leaving the visitors as runners-up.