Warwickshire 123 (Westwood 34, Bess 6-28) and 131 for 8 (Clarke 42*, Wright 38*) require a further 53 to beat Somerset 95 (Barker 4-33) and 211 (Rogers 58, Patel 5-86)
Rikki Clarke and Chris Wright produced an unbroken ninth-wicket stand of 70 as Warwickshire set up the prospect of an exciting third-day finish to the Specsavers County Championship match with Somerset at Taunton.
The visitors closed day two on 131 for 8, needing a further 53 for victory, having been 61 for 8 at one stage, chasing a target of 184. Left-arm spinner Jack Leach claimed 5 for 33 from 18 overs.
Clarke was unbeaten on 42 and Wright 38 not out, having come together with their team on the verge of defeat. Both hit sixes in a defiant and positive partnership.
Earlier, Jeetan Patel had finished with 5 for 86 as Somerset, from an overnight 41 for 1, were bowled out for 211 in their second innings, skipper Chris Rogers top-scoring with 58, the only half-century of the match so far.
After 21 wickets had fallen on the first day, ECB Cricket Liaison Officer Phil Whitticase was sent to view the second day's play.
It was batting errors, rather than any great terrors in the pitch, which accounted for the vast majority of wickets. There was assistance for seam and spin bowlers on both days, but also a large number of soft dismissals, which both sides will reflect on with regret.
Somerset led by 13 runs when play began and had progressed their second innings to 70 when Marcus Trescothick, on 25, had his off stump uprooted by Patel.
James Hildreth made only a single before falling lbw to a Chris Wright delivery that nipped back off the seam. But from 75 for 3 Somerset prospered, Rogers reaching a 123-ball half-century, and Peter Trego hitting sixes off Patel and Josh Poysden.
The home side looked well placed at lunch, which was taken with their score 128 for three. But Patel began the afternoon session by gaining lbw verdicts against Trego (31) and Rogers after a fourth-wicket stand of 55.
Leg-spinner Josh Poysden weighed in with 3 for 52 as only Dom Bess (25) offered much lower order resistance.
Although the ball was turning, Warwickshire would have fancied their chances when their second innings began. Instead a mixture of good bowling and inept batting saw them slump to 49 for 6. Leach ripped the heart out of the innings by sending back Jonathan Trott and Ian Bell for a combined contribution of five runs before having Alex Mellor caught at short-leg for 22.
Bess removed Sam Hain and Keith Barker, both pouched by Marcus Trescothick, who with the second dismissal equalled the record number of catches in first class cricket by a Somerset outfielder, 393, set by Jack White during a career that ended in 1937.
But just when it seemed Somerset were sure to wrap up victory, Clarke and Wright produced the biggest stand of the match, putting the state of the pitch firmly in perspective.