Sean Ervine's first century for more than two years helped earn promotion-seeking Hampshire four precious batting bonus points but failed to avert the follow-on on the third day of the LV= County Championship match with Kent at the Ageas Bowl.
Long-serving Zimbabwean Ervine made 121, sharing in a stand of 98 with last man James Tomlinson, but was stumped attempting his fifth six an agonising seven runs short of making Kent bat again.
Hampshire were eventually all out for 351 in response to Kent's first-innings total of 507 made over most of the first two days but fared better batting a second time and ended only 46 behind at 110 for one.
If Hampshire are able to fashion a draw on a wicket taking some spin, they will go into the final fixture of the season at Glamorgan 10 points ahead of third-placed Essex who face a showdown with leaders Worcestershire.
The third day in more south-coast sunshine unquestionably belonged to 31-year-old Ervine, who hit his last century against Glamorgan back in May 2012. His previous best score this season came in the opening fixture against Worcestershire when he made 93.
The 15th century of his first-class career was as unexpected as it was important since Hampshire were at one stage 253 for nine until he found in Tomlinson a reliable and sturdy ally in a 23-over partnership which held up Kent for 85 minutes just when they seemed poised for a substantial lead.
Hampshire started at 127 for three and needed a commanding innings from their leading runscorer James Vince to stand any chance of overhauling Kent's biggest total of the season. They did not get it.
Vince had added only six to his overnight 64 when he was caught at the wicket by Sam Billings pushing forward at James Tredwell and Hampshire's middle order struggled against spinners Tredwell and Adam Riley.
The pair bowled almost 65 overs between them in marathon stints but they had plenty of rewards in the shape of a regular supply of wickets.
Adam Wheater made a brisk 30 before top-edging a sweep off Tredwell to Darren Stevens in the slips at 179 and Riley claimed his first wicket of the day when England Under-19s left-hander Tom Alsop gave a return catch from a leading edge.
Alsop, making his debut, had batted patiently for his 33 which included a straight-driven six off Riley but his departure at 205 was the prelude to three more quick dismissals.
Chris Wood was leg before to Tredwell and former Kent pace bowler Matt Coles was brilliantly taken one-handed by wicketkeeper Billings off Mitchell Claydon soon after.
When Imran Tahir drove Riley to Robert Key at short extra cover at 253, the end seemed imminent.
But then Ervine led the recovery in a belligerent innings which included 12 fours and four sixes, three of them off Riley and the other off Tredwell, as Hampshire edged towards their target of avoiding the follow-on.
Just when it seemed they would succeed, Ervine went down the wicket and was stumped comfortably. Ervine flung his bat skywards in disappointment.
Tredwell, who had claimed Ervine's wicket, finished with 4-102 and Riley, despite the battering he took from Ervine, took 3-124.
Tredwell was soon back in action as Hampshire came out a second time and was quickly among the wickets, dismissing the opposition captain Jimmy Adams leg before for six when the score was 20.
At this point Will Smith and Liam Dawson came together and at the close they were still there, Smith 66 not out - during which he reached 1,000 runs for the season - and Dawson unbeaten with 28.
Tredwell said: "You will not get many better hundreds in those circumstances than the one Ervine got. As Tomlinson showed, there are not many rollover number 11s in county cricket these days.
"The last-wicket stand got them what might prove to be crucial batting points. The wicket is still good though taking a bit of turn, so bowling on it was hard work.
"If we can get early wickets we can get amongst them but Hampshire might set us a target, which could be interesting."
Ervine said: "This century is right up there with the best I have scored. If we go up it will be pleasing to think that it may have been as a result of those bonus points we got here.
"Imran Tahir and Tommo were a great support to me because I needed them to stay there. I had to take a few risks and skied a few shots but luckily they landed in the gaps.
"I was just annoyed at getting out in the way I did with only a few runs needed, but that is the way it goes."