Sussex 284 (Philander 73*, Finch 61, McKay 4-35) and 100 for 2 require a further 132 runs to beat Leicestershire 340 (Cosgrove 128, Archer 5-67) and 175 ( Archer 6-70)
A six wicket haul for Jofra Archer, to go with the five he took in the first innings, left Sussex favourites to win their Specsavers Division Two championship match against Leicestershire at the Fischer County Ground.
Needing 234 to win, the visitors closed the third day on 100 for 2, Leicestershire seamer Ben Raine having dismissed Sussex openers Harry Finch, bowled, and Chris Nash caught behind.
The 22-year-old fast bowler Archer shouldered the burden for a Sussex attack deprived of the services of South Africa international seamer Vernon Philander, who rolled an ankle in the field during the morning session.
With fellow South African David Wiese unable to bowl more than a handful of overs due to a stomach strain, Archer (6-70) and left-arm spinner Danny Briggs (3-40) produced outstanding efforts to give their side a good chance of securing a second successive championship win.
The morning session had seen Barbados-born Archer have Paul Horton caught behind off a brutal lifter and pin Ned Eckersley leg before with a well-pitched up delivery which beat the batsman for pace.
Colin Ackermann was given out caught behind down the legside off Chris Jordan, but the biggest blow for the home side was the loss of in-form captain Mark Cosgrove, who went back to a delivery from Briggs, missed and was palpably leg before.
Shortly after lunch Pettini got his bat down on an Archer yorker but was unable to prevent the ball rolling back on to his off-stump. Another quick, straight bouncer then accounted for Harry Dearden, the ball flicking the batsman's glove on its way through to the wicket-keeper.
Briggs dismissed Tom Wells in extraordinary fashion, putting up his right hand and deflecting a firmly hit lofted straight drive into the air for Archer, at mid-on, to take a simple catch.
Raine edged a straight delivery from Briggs into the hands of Jordan at slip, and Clint McKay, having been horribly dropped by Wiese off Briggs, edged Archer into the slips where Finch held a smart low catch to his left.
Leicestershire's final pairing of Dieter Klein and Zak Chappell then fought hard to extend the Foxes lead to 241 before Klein was yorked by Archer.
Earlier in the day, Philander and Briggs extended their tenth wicket partnership to 83, a county record for Sussex against Leicestershire, eclipsing the 80 compiled by John Vinsett and Harry Butt at Aylestone Road in 1909.