Jim Allenby became Glamorgan's second centurion of the season as the Welsh county set up a charge for victory on the third day of their LV= County Championship Division Two match against Kent at the SWALEC Stadium.
Glamorgan were homing in on their second win of the four-day campaign after amassing 527 all out in their first innings, an overall lead of 274, before Kent were reduced to 137 for five by the close. They still needed another 137 to avoid an innings-defeat.
Allenby followed in the footsteps of Jacques Rudolph, who had registered the county's first century of the summer on the second day.
It looked as if there would be a third player to three figures but Chris Cooke fell four runs short of registering his maiden championship hundred.
Allenby and Cooke's fifth-wicket partnership of 212 - a Glamorgan record against Kent - put their side in the driving seat after they had resumed on 337 for eight, a lead of 84.
With some late runs from Graham Wagg Glamorgan were bowled out for 527, an overall lead of 274.
Cooke and Allenby guided Glamorgan to maximum batting points with their partnership and in the process broke the record for the county's fifth wicket against Kent, beating the 186 put on by Tony Cottey and David Hemp at Abergavenny in 1994.
— Glamorgan Cricket (@GlamCricket) June 17, 2014
Allenby's century arrived off 132 balls with 13 fours and two sixes out of 414 for four - a lead of 161. The 200 partnership arrived two overs later in 40 overs.
But in the space of three overs both batsmen perished. First Allenby was trapped leg before by Mitchell Claydon without adding to his 100, leaving Glamorgan 419 for five - a lead of 166.
And, agonisingly four short of a maiden championship century, Cooke dragged Adam Riley on to his stumps to leave the home side 427 for six.
Ruaidhri Smith then became Riley's fourth victim before Wagg and Andrew Salter took the score to 500. Salter then gave Robbie Joseph a return catch off a full-toss.
Riley's hard work was rewarded with a five-wicket haul - despite him conceding 157 runs - when he bowled Wagg for a useful 66, and the innings was brought to a spectacular end when Brendan Nash pulled off a fine one-handed catch at extra-cover to remove Michael Hogan.
It did not get much better for Kent as they found themselves eight for two in the fourth over.
A delighted Wagg dismissed Daniel Bell-Drummond, who played on, with the first ball of the second innings.
And at the other end Rob Key was caught behind via an inside edge off Hogan.
More trouble befell Kent as Fabian Cowdrey scored nine for the second time on his championship debut before being bowled by Hogan, leaving the visitors in a dire position at 25 for three.
There was more trouble for Kent before the close. Nash was caught by Ben Wright off Salter and Ben Harmison went two overs before the close, caught at slip by Allenby off Dean Cosker.