Somerset ended the third day's play against Lancashire still 189 runs short of their 393 target to win a first Vitality County Championship.
At the close of play at Emirates Old Trafford, Somerset were 204 for six.
Should they succeed, Somerset will continue their battle with Surrey into the final week of the season.
However, a defeat would see Lancashire relegated, with the side also facing Division Two cricket next season if Nottinghamshire secure 10 points from their final match against Warwickshire.
Warwickshire would also need five points from that game.
In the day's play, Luke Wells contributed 130 to Lancashire's second-innings total of 398.
Archie Vaughan responded with 68, offering some hope for Somerset in their pursuit of the highest fourth-innings run-chase against Lancashire.
However, Somerset's hopes were severely dented when George Balderson dismissed both Vaughan and Tom Kohler-Cadmore after tea.
Kacey Aldridge and James Rew appeared set to prevent further losses for Somerset until Aldridge was caught by Matty Hurst off Wells for 19, with just four balls remaining in the day.
In an extended morning session, Lancashire added 100 runs for the loss of their last three wickets.
Wells and Balderson, cautious in the first hour, added 36 runs to their overnight score of 298 for seven.
A thick-edged three to third man off Aldridge saw Wells to his second hundred of the season.
Wells and Balderson's partnership reached 135, setting a new eighth-wicket record for Lancashire against Somerset, before Wells was leg before wicket for 130 to Jack Leach.
Tom Bailey was also leg before to Leach for a single, and the innings concluded when Balderson was bowled by Brett Randell for 47.
Leach finished with three for 57, and Randell took three for 71.
Somerset's chase of 393 began disastrously when Andy Umeed was bowled out by Bailey’s second ball.
This was followed by a 105-run partnership for the second wicket between Vaughan and Tom Lammonby, which ended when Lammonby was bowled for 49 by Wells.
Vaughan reached his maiden first-class 50 off 84 balls, but Somerset's afternoon session ended poorly when Tom Abell was leg before wicket to Anderson Phillip for five.
Nine overs into the evening session, Vaughan was caught at slip by George Bell for 68, leaving Somerset on 146 for four.
The same combination accounted for Kohler-Cadmore, who made 23 before edging to slip.
In the first gloomy conditions of the game, Aldridge and Rew resisted Lancashire’s attack until Wells struck the final blow.
Balderson has so far taken two for 33 from 14 overs.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules here