Hamish Marshall's innings of 114 enabled Gloucestershire to recover from a shaky start to finish on top in Southampton, where Hampshire failed to make the best of helpful bowling conditions.
Gloucestershire were 56-3 in this County Championship Division Two contest but recovered thanks to Marshall's diligence to finish on 349-7 from 96 overs.
After the entire first day had been lost to rain, it was a good toss to win on a green-looking wicket and under gloomy skies and a strong wind. Hampshire's Jimmy Adams won it and chose to field.
Almost immediately Adams could see his decision justified, as the man who lost the toss, Gloucestershire's Michael Klinger was out at the end of the first over.
Hampshire brought in Pakistani all-rounder Sohail Tanvir for his debut and it was Sohail who claimed his first wicket in county cricket, Klinger leg before without offering a shot.
Hampshire also brought in Dimitri Mascarenhas for his first Championship match of the season and the wily veteran sent back Dan Housego at 41, again leg before.
With the ball moving off the seam, batting was a hazardous business and Alex Gidman was next to go at 56, edging David Balcombe to Liam Dawson at second
slip. Dawson had earlier dropped a similar chance.
Then, as the sun came out, Chris Dent was joined by Marshall and the Gloucestershire recovery began. Obdurate Dent batted through the difficult first session for 34 but added only one more after the lunch break before providing Sohail with his second - and last - wicket of the day, Dawson again holding the catch at second slip.
Marshall, now 34 and seven years since the last of his 13 New Zealand Test caps, lifted Balcombe for the first of his two sixes as Hampshire failed to press home their morning advantage.
With former Hampshire batsman Benny Howell offering solid support, the fifth wicket pair put on 106 in 28 overs before Howell was bowled by Sean Ervine for 54, an innings which included eight boundaries against his old club.
Marshall hit the spin of Liam Dawson for his other six on his way to the 22nd century of his first-class career, before Balcombe found an edge at 289 and Dawson completed his third catch. Marshall faced 184 balls and also hit 13 fours and by the time of his departure Gloucestershire had gained the upper hand.
In the evening session Gloucestershire also lost Will Gidman at 338 to a catch behind off Mascarenhas but Gareth Roderick and James Fuller saw their side through to the close without further mishap.
Sohail can be satisfied with his first appearance, finishing with two wickets for 68 runs off 20 overs, while there were two wickets each for Balcombe and Mascarenhas.