Essex 233 and 147 for 1 (Vijay 73*) need a further 135 to beat Nottinghamshire 177 and 337 (Brathwaite 68, Mullaney 53, Harmer 6-87)
Simon Harmer's best figures of the season and M Vijay's second half-century of the match have given Essex a chance of toppling Nottinghamshire in their Specsavers County Championship meeting at Trent Bridge.
Harmer took 6 for 87 as Notts were bowled out for 337 in their second innings, leaving the defending champions requiring 282 for victory. Kraigg Brathwaite made 68 for the hosts and Steven Mullaney scored 53 before becoming Harmer's fifth victim.
Vijay, who hasn't played since making a pair for India in the second Test of the recent series against England, followed up his first-innings 56 with an undefeated 73 as Essex closed on 147 for 1.
The home county began the day in good shape on 116 for 1 but lost three wickets, all to Harmer, during the opening session. Luke Fletcher, the nightwatchman, had an eventful time at the crease. He was struck on the elbow by a wild throw from Nick Browne and also reprieved after being caught off a no-ball from Matt Coles.
Nevertheless, the local favourite, a few days away from his 30th birthday, skilfully frustrated the Essex attack for more than two hours in making 39.
Brathwaite, the West Indies' opener, reached his third half-century in as many matches for Notts, getting there from 117 balls with his ninth boundary. The opener stroked three more fours before being pinned on the crease by Harmer's offspin. Fletcher's lengthy vigil ended in the same manner and Jake Libby lost his off stump for 15.
Resuming from their lunchtime score of 208 for 4, Notts lost their fifth wicket to an unexpected source. The visitors opened the session with the part-time spin of Tom Westley and the hunch paid off as Ben Duckett fell lbw for 17.
Harmer returned to the attack soon after the second new ball had been taken and bagged three further wickets as Notts lost their momentum. Tom Moores was stumped for 15, after a stand of 68 with Mullaney, who nicked the spinner into the hands of wicketkeeper Adam Wheater.
The former South African international then had Lyndon James caught by Ryan ten Doeschate at short leg before Jamie Porter removed Samit Patel and Mark Footitt to polish off the innings.
Essex began their pursuit of 282 with the early loss of Browne, playing all around a full-swinging delivery from Footitt. Vijay and Westley, who is undefeated on 45, negotiated the rest of the final session in adding an unbroken 130 together to put Essex firmly on the way towards their first victory at Trent Bridge since 2003.