Harry Finch fell two short of his second century of the season as Sussex set Gloucestershire 276 to win on the third day of the Specsavers County Championship match at Cheltenham.
Having top-scored with 76 in his side’s first innings, the 23-year-old batsman faced 143 balls, hitting 16 fours and a six, to provide the backbone of a second innings score of 296 all out on a seamer-friendly pitch.
Luke Wright (48) and David Wiese (40) batted positively, while David Payne’s figures of four for 69 included his 200th first class wicket.
By the close, Gloucestershire had made 30 for two, losing openers Chris Dent and Miles Hammond to Archer, and an enthralling contest will enter its final day with Sussex favourites.
The day began with the home side 303 for eight in their first innings following a collapse on the previous evening. When only three runs were added, it meant the last seven wickets had fallen for 11 in 8.5 overs.
Jofra Archer finished with four for 62 and Gloucestershire were left kicking themselves, with a lead of only 20, having been 295 for three at one stage. Gareth Roderick remained unbeaten on 50, having reached his half-century off 115 balls, with 7 fours.
The hosts hit back by reducing Sussex to 22 for two, Ryan Higgins bowling Phil Salt and Payne reaching the 200 milestone when Luke Wells edged a defensive shot through to wicketkeeper Roderick.
But Wright counter-attacked with typical panache and was unbeaten on 48 at lunch, having struck 9 fours and a six in adding 81 with Finch.
A match of fluctuating fortunes tilted Gloucestershire’s way again when Wright mistimed a drive to mid-off straight after the interval and Payne bowled Michael Burgess for five with the score 119 for four.
The Sussex lead was just 99, but skipper Ben Brown then shared a stand of 61 with Finch, who moved to his second fifty of the game off 85 balls with 10 fours.
Brown fell lbw to Matt Taylor for 20, with his side 160 in front, and when Finch fenced at a delivery from Craig Miles just short of his ton the contest looked evenly balanced with the scoreboard showing 219 for six.
Wiese was unbeaten on 35 at tea, which was taken at 240 for six, but could add only five after the interval before Miles pulled off a stunning catch at full stretch running from mid-off to mid-on to give Higgins a second wicket.
Archer was bowled around his legs by Payne, but Chris Jordan’s 31 before being caught behind off Miles and a handy 19 from Robinson ensured that Gloucestershire would face a stiff task.
They were given a boost with their total on 23 when Hammond was dropped by Wiese at cover off Archer. But the same bowler quickly sent back Dent, caught behind down the leg side, and then induced a nick from Hammond, who departed for 11.
Gloucestershire responded by sending in two nightwatchmen. George Drissell and Taylor were not made to play often enough and survived to the close, with their side needing a further 246.
Speaking at the close, Finch said: "I was more disappointed for the team than for myself when I got out because I felt if David Wiese and myself were still together at tea we would have been in a very strong position.
"But I am happy with my contribution to the match. The pitch hasn't turned, but there is still enough in it for the pace bowlers if they pitch around off stump and aim to hit the knee roll.
"The ball was nipping around in the morning session and I needed a bit of luck early on, but that was always going to be the case on that sort of wicket."