Contepomi scored two tries for Bristol
Bristol 30-20 Bath
Bristol hauled themselves off the bottom of the Zurich Premiership table with victory over West country rivals Bath at a packed Ashton Gate.
Bath's defeat means only victory at home to Newcastle in their final game - or a possible merger with Bristol - will save them from relegation.
The six-time English champions and 1998 Heineken Cup winners were undone by two second-half tries from Bristol fly-half Felipe Contepomi.
The Argentine's second touchdown was an 85-metre interception score which makes relegation for Bristol an unlikely prospect.
Bath are now three points adrift at the bottom of the Premiership, having won fewer league games than any other team this season.
Tries: Gibson, Contepomi (2)
Cons: Drahm (3)
Pens: Drahm (2)
Drop goal: Drahm
Tries: G Thomas, Maggs
Cons: Barkley (2)
Pens: Barkley (2)
Kick-off was delayed by 15 minutes to allow all of the 20,793 spectators - a Premiership record - to get into Ashton Gate.
Bristol were 10-6 down after 30 minutes but dominated most of the game after that.
They took an 11th-minute lead with a penalty from Shane Drahm, but Bath grabbed the first try when hooker Jonathan Humphreys fed Gavin Thomas.
Olly Barkley converted, before Drahm booted another penalty.
A 50-metre Barkley penalty put Bath four points clear, yet Bristol dug deep and went ahead for the first time on 35 minutes.
Their forwards powered to within sight of Bath's line and Daryl Gibson crashed over for a try converted by Drahm.
Everyone is very down and very disappointed
Foley, Bath coach
Drahm then missed a relatively straightforward penalty and Barkley made it 13-13 at half-time after Shoguns flanker Michael Lipman
Bristol then created a three-man overlap and Contepomi cut back inside to touch down between the posts for a score converted by Drahm.
Contepomi grabbed his second try and Kevin Maggs' converted injury-time try was little consolation for Bath as Drahm had the final say with a 50-metre drop-goal.
Bristol: Drahm, Rees, Gibson, Higgins, Christophers, Contepomi,
Pichot, Sheridan, Johnstone, E. Bergamaschi, S. Morgan,
A. Brown, Short, Lipman, Oakley. Replacements: Skuse, Nelson, C. Morgan, Styles, Carrington, Hodgson.
Bath: Balshaw, Voyce, Maggs, Tindall, Seveali'i, Barkley,
Cooper, Barnes, Humphreys, Mallett, Borthwick, Grewcock,
G. Thomas, Beattie, N. Thomas. Replacements: Blake, Long, Stevens, Malone, Danielli, Scaysbrook, Lyle.
Referee: Ashley Rowden (RFU).