Monty Panesar completed a match haul of 10 wickets to help Essex to the verge of victory going into the final day of their LV= County Championship Division Two match against Glamorgan at Swansea.
The slow left-armer followed up 5-50 in the first innings with 5-90 in the second.
But, despite claiming an extra half-hour on the third evening, Essex failed to take the final two wickets with the Welsh county finishing the third day on 237 for eight after they had been set 348 to win.
Essex, who were down two bowlers – with Graham Napier (calf) and Ryan ten Doeschate (shoulder) unavailable – were frustrated by an impressive 64 not out from Graham Wagg, who ensured the match went into a fourth day.
The visitors had begun the day on 131 for five and were bowled out for 222
At the start of the day Greg Smith, who had been dropped first ball yesterday evening, went to his second half-century of the season from 88 balls with eight fours and one six.
Ten Doeschate struck Dean Cosker for two consecutive sixes over long-on and then pulled him for another six over midwicket to bring up the hundred partnership and his own half-century from 99 balls.
Graham Napier is bowled by James Harris as @EssexCricket set @GlamCricket a challenging target of 348. pic.twitter.com/uccfihreld
— Huw Evans Agency (@HuwEvansAgency) August 17, 2014
After a productive hour for the visitors, Glamorgan grabbed the breakthrough when Smith edged behind attempting to cut a wide one from Jim Allenby. It left Essex 195 for six, leading by 320.
Napier, batting with a runner, only lasted 10 balls, playing on to James Harris.
The next wicket occurred in bizarre circumstances when Sajid Mahmood was run out coming back for a second after colliding mid-pitch with ten Doeschate.
As well as Mahmood being dismissed, ten Doeschate also retired hurt after facing one more ball. Ten Doeschate returned to the middle after Panesar drove a return catch to Harris.
And a return catch ended the innings when Allenby took a sharp one-handed effort to remove Matt Salisbury.
Glamorgan were left 20 minutes to survive before lunch but Panesar, who opened the bowling, broke through Jacques Rudolph's defences as the home side limped to the interval at 13 for one.
After lunch Will Bragg became Panesar's second victim, sweeping to midwicket before Glamorgan steadied things and from 24 for two Murray Goodwin and Chris Cooke put on 87.
Monty Panesar now has 10 wickets in the match, The first time he has recorded the feat for Essex # GlavEss
— Essex Cricket (@EssexCricket) August 17, 2014
Glamorgan had reached 111 for two when Panesar trapped Goodwin lbw on the back foot.
On the stroke of tea Nick Browne's leg-spin nearly accounted for Cooke, who edged past first slip to bring up his fifty from 92 balls with nine fours. Glamorgan went to the interval on 119 for three.
Only six balls after tea Panesar bagged his fourth wicket when he had Cooke caught at slip by Jesse Ryder.
From 120 for four, the hosts slipped to 144 for six when Allenby glanced Tom Westley straight to substitute fielder Tim Phillips at leg slip and Panesar completed 10 wickets in the game when he trapped Mark Wallace leg before.
Glamorgan's innings went from bad to worse as Andrew Salter was dismissed second ball by Westley, caught at leg slip by Phillips attempting to sweep.
There was some resistance shown from Wagg and Harris, who put on 76 in an hour.
But, 15 minutes before the scheduled close, Harris went lbw to Smith.
Wagg went on to complete his fifty from 74 balls, though, and Essex could not snare the final two wickets despite claiming the extra half hour.