Marcus Trescothick completed his seventh double-century of his career on Day Three at Trent Bridge against Nottinghamshire.
The opener was finally out for 218, whilst Imran Tahir finished with seven Somerset wickets.
Somerset were all out for 437 before the home side finished day three on 58-2.
Trescothick resumed on 118 on Tuesday morning with Jack Leach, who faced 15 deliveries before he was Tahir’s first victim of the day and second of the innings.
He went for one from 37 balls, bringing Jim Allenby alongside Trescothick.
They were to stifle Nottinghamshire’s attack for the next 38 overs.
Trescothick brought up his 150 an hour and a half into the day, Notts becoming the 17th side the left-hander has hit 150+ for in his career.
Lunch arrived with Somerset well on top at 346-4 and Allenby on 46.
Somerset started the day’s second session positively as Allenby brought up his 50 with a straight drive shortly after lunch as the partnership passed 100, Somerset’s third 100+ partnership of the innings.
Notts were made to wait till midway through the afternoon for a wicket as Samit Patel bowled Allenby for 63, leaving Somerset 379-5 after a partnership of 122, just 22 behind their hosts.
Peter Trego and Trescothick brought up maximum batting points for Somerset before Brendan Taylor took a smart catch off Tahir to remove Trego and Lewis Gregory was Tahir’s next scalp just four overs later.
Trescothick, on the other hand, was unphased by the South African leg-spinner and went to 200 with a drive through cover off Patel, bringing up 1000 runs for the season in the process.
Tahir continued to cause chaos at the other end as Craig Overton was Tahir’s fifth before Ryan Davies was his sixth.
Tahir had the last laugh as Trescothick was the last man out, chipping to Taylor at cover.
Somerset’s last five wickets had gone for just 37 runs thanks to Tahir, but they had still racked up 437 to take a 36-run lead.
Trescothick was out for 218 from 355 balls, whilst Tahir had 7-112 from 36.4 overs.
That gave Steven Mullaney the chance to bat again after his 165 in the first innings, but he was unable to repeat his first innings heroics as he was lbw to Overton for 11, giving Somerset their first wicket inside ten overs.
Nottinghamshire had 26 overs to bat in their second innings and Allenby completed a miserable test match for Michael Lumb as his middle stump went cartwheeling for a four-ball duck after his ten in the first innings.
With Notts in trouble at 21-2, Jake Libby and Taylor steadied the ship for Notts and batted out the final 16 overs of the day in fairly pedestrian fashion, Libby 24 not out at stumps after his 90 in the first innings and Taylor 22 not out going into the final day,
The hosts will resume 58-2 on Wednesday, 22 runs ahead and it will take some going from Somerset’s bowlers to avoid anything but a draw in this one.