Unbeaten tons to Tom Abell, Tom Lammonby have Somerset in total control
Somerset 389 (Abell 111, Bartlett 62, Keogh 4-99) and 277 for 1 (Abell 112*, Lammonby 101*, Imam-ul-Haq 52) lead Northamptonshire265 (Young 85, Taylor 60*, Overton 5-38) by 401 runs
Somerset will go into the final day of their LV= Insurance County Championship match with Northamptonshire at Taunton in a strong position, knowing that victory will guarantee First Division survival.
With a lead of 401 and nine second-innings wickets still in hand, the home side can feel confident of at least a draw, which would put them 17 points clear of second-from-bottom Warwickshire.
Having bowled out Northamptonshire for 265 from an overnight 184 for 6, Craig Overton finishing with 5 for 38, Somerset built on a first innings lead of 124 by posting 277 for 1.
Unbeaten centuries from skipper Tom Abell, his second ton of the match, and Tom Lammonby led the way, while Imam-ul-Haq contributed 52. Abell hit 112 not out and Lammonby 101 not out to effectively bat Northants out of the game.
If Somerset can complete victory, it will open up a 25-point gap on Warwickshire and lift them to a comfortable sixth place in Division One, with the final round of fixtures next week.
They began the third day against Northants in perfect fashion when Josh Davey had Saif Zaib well caught low down at second slip by Overton off the first ball of the morning.
But Tom Taylor, unbeaten on 19 overnight, moved to an impressive fifty off 69 balls by cutting his tenth four off Kasey Aldridge.
Another Taylor boundary off Abell took Northants past the follow-on figure at 240 for 7 and Somerset's attack, lacking the injured Lewis Gregory, were looking frustrated as Lizaad Williams helped add 63 for the fourth wicket.
That changed with a needless run out. Taylor played Sajid Khan into the leg side with no intention of taking a single, but Williams, on 23, charged down the pitch from the non-striker's end and was sent packing by Josh Davey's throw to the bowler.
Aldridge had Ben Sanderson caught at mid-on and Overton wrapped up the innings when Jack White was caught behind, backing away towards square leg.
By lunch, Somerset had extended their lead by 12 to 136 and the afternoon session saw Lammonby and Imam build further without undue alarm.
Imam was first to his half-century off 74 balls, having hit four fours and a straight six off Rob Keogh, a shot which took the lead to 200.
The Pakistan Test opener fell shortly afterwards, allowing a ball from off-spinner Keogh to run up his pad onto a glove before being taken by wicketkeeper Ricardo Vasconcelos, running in front of the stumps.
By then the lead was 225 and Lammonby soon followed his opening partner to fifty, having faced 115 balls and hit five fours.
By tea, Somerset had progressed to 118 for 1, with Lammonby on 54, and arch-rivals Gloucestershire were on the verge of doing them a huge favour by beating Warwickshire.
The final ball at Bristol was shown on the screens down the M5 at the Cooper Associates County Ground to relieved applause from Somerset fans, as in front of them, Lammonby and Abell built a half-century stand from 70 balls.
Abell launched a six over mid-wicket off Keogh as his side accelerated towards a declaration in the morning. His fifty occupied 49 deliveries and also featured five fours.
Successive Abell boundaries off Keogh took the lead past 350, while another four in the off-spinner's following over took Somerset's captain past 1,000 first class runs for the season.
A swept single off Keogh completed Abell's fifth hundred of the summer off 87 balls, with 14 fours and a six.
Lammonby lost nothing by comparison, curbing his natural attacking instincts to strike just eight boundaries in his patient 221-ball century. By stumps the stand between the pair was worth 176.
Abell left the best till last, a swashbuckling six over extra cover off Josh Cobb in the final over of a Somerset-dominated day.