Springbok half-back duo Michael Claassens and Butch James scored all the points as Bath held on for a 19-15 win to leapfrog Harlequins into sixth place in the Aviva Premiership Rugby table, boosting their hopes of Heineken Cup rugby next season.
The only try came after just 11 minutes as scrum-half Claassens finished one of the few fluent moves of a tension-racked game with James converting and kicked four penalties, missing just one kick. All Harlequins' points came from the boot of All Black fly-half Nick Evans.
Despite perfect windless conditions, it was clear both teams were hamstrung by the fear of missing out on the European bonanza next season and the match was dominated by the whistle of referee Dave Pearson.
Bath were forced into a late change when David Flatman had to be replaced by Nathan Catt at loosehead. Mark Lilley came on to the bench. The team was already without Luke Watson, who suffered a twisted knee in the win over Exeter last week. Ben Skirving returned at number eight. Quins had Chris Robshaw back to lead the side with Will Skinner dropping to the bench.
Bath were on the defensive from the kick-off but a towering mark by Matt Banahan relieved the early pressure before the home team picked up the pace. Flanker Guy Mercer broke the line but inexplicably chipped ahead rather than hanging on to the ball.
The try was not long in coming, however. Nick Abendanon made ground down the left and when the ball was swung right, Shontayne Hape glided through the Quins defence, found support from Skirving and Claassens was on hand to finish off. James's conversion put Bath 7-0 ahead with 11 minutes gone.
The Londoners were quickly back into an attacking rhythm and George Lowe knocked on as the home defence scrambled across. Their reward came on 18 minutes as Nick Evans kicked a penalty after Bath were caught offside under their own posts.
As the first quarter ended, the intensely attritional nature of the contest resulted in an injury to blindside flanker Stuart Hooper, so off the bench for the second time in eight days came Josh Ovens. Still the tackles piled in as both defences held firm, but at the cost of penalties.
Evans pulled back another three points on 26 minutes but James banged over a 40-metre angled kick almost immediately afterwards after David Wilson was high-tackled.
Quins forced two more penalties around the tackle area but the 15-times capped All Black fly-half slotted just one of those, in the 34th minute. He was also off-target with a dropped goal attempt on the stroke of half-time, leaving Bath with a 10-9 advantage at the break.
There was little change to the pattern after half-time as James slotted two penalties from long-range to open up a 16-9 lead before Evans kicked his fourth penalty on 52 minutes, as Bath conceded after trying to run out from the 22.
The home side, under pressure in the scrums, had another narrow escape when Evans wriggled away from a tackle and Quins came even closer to scoring as Robshaw broke away on the hour, only to be hauled down by Peter Short. When Sam Vesty spoiled the ruck ball, quite illegally, on the line he was shown the yellow card and Evans kicked the goal to make it a one point game again.
The tension showed no sign of easing when James kicked his fifth penalty on 63 minutes, again from 40 metres, but the Springbok fly-half was substituted with 10 minutes left.
Wing Tom Biggs was sent on to inject some pace into Bath's play and the game began to break up. But the nerves even got to England scrum-half Danny Care, who knocked on taking a tapped penalty and when Quins did get into the home 22 they spilled the ball.
In an increasingly frantic final few minutes the visitors threw everything at the home defence, eventually knocking on two metres from the line long after the clock had stopped.