Glamorgan 187 for 4 (Selman 73, Labuschagne 56*) trail Gloucestershire 313 (Dent 105, Hammond 61) by 126 runs
Chris Dent notched his 16th first class century and Marchant de Lange his 300th wicket as Gloucestershire and Glamorgan battled for supremacy on the second day of the Specsavers County Championship match at Bristol.
It ended with the visitors 187 for 4 in reply to Gloucestershire's 313, Marnus Labuschagne enhancing his position as the leading run-maker in the competition this season with an unbeaten 56 and Nicholas Selman making 73.
The home side had lost their last five wickets for 47 to the second new ball after lunch, Michael Hogan and Graham Wagg ending with three wickets each and wicketkeeper Tom Cullen claimed five catches.
Skipper Dent, who began the day on 82, was dismissed for 105, his second successive Championship hundred, but had reason to be disappointed with his team's total from a position of 168 for 1 at stumps the previous evening.
Hogan made the first breakthrough of the morning when James Bracey, on 28, edged to David Lloyd at first slip. Dent went to his century, off 174 balls, with 14 fours, with a boundary off de Lange.
The left-hander perished soon afterwards, nicking Dan Douthwaite through to Cullen, who soon took another catch, off Wagg, to send back Benny Howell.
Wagg struck again when Jack Taylor, on 13, was taken by Selman in the slips and at lunch Gloucestershire were 266 for 5, with Gareth Roderick and Ryan Higgins having added 33 for the sixth wicket.
The afternoon session began with Roderick's middle stump being uprooted by Hogan, who followed up by having Higgins caught behind.
Then de Lange reached a personal milestone, bowling David Payne's off stump to bring up his triple century of first class victims. It was no more than the South African deserved after having three catches spilled.
Graeme van Buuren earned Gloucestershire's third batting point with a cover driven four off de Lange before Wagg had him caught behind by Cullen, who made it five catches in the innings by dismissing last man Matt Taylor off Douthwaite.
Glamorgan could feel pleased with their efforts and momentum stayed with them as openers Selman and Charlie Hemphrey put together a stand of 35 before tea. They were parted with the score on 58 when Gloucestershire keeper Roderick took a fine low catch, diving to his right, to dismiss Hemphrey for 28.
Josh Shaw was the successful bowler and he struck again after a partnership of 95 between Labuschagne and Selman, having the latter well caught at slip by Howell after hitting 10 fours in his 132-ball innings.
Lloyd could make only a single before edging Higgins through to Roderick and the day ended with Matt Taylor bowling Billy Root for 21. By then Labuschagne had continued his impressive season by moving to a half-century off 78 deliveries, with five fours and a top-edged six off Payne. The 25-year-old Australian, eager to earn a place in his country's Ashes squad, now has 760 Championship runs this season at an average of 69.
At the close, Glamorgan trailed by 126, with Gloucestershire's bowlers, Payne in particular, looking for a change of luck on day three, having passed the outside edge on numerous occasions.