Premiership: Harlequins 21-20 Bath
|Harlequins (11) 21|
|Tries: Visser, Dickson Con: Swiel Pens: Swiel 3|
|Bath (10) 20|
|Tries: Palma-Newport, Catt Cons: Homer 2 Pens: Homer 2|
Harlequins condemned Bath to just their second Premiership loss of the season with a hard-fought home victory.
Tim Swiel's late penalty was the difference for Quins after the lead changed hands several times.
Quins' Tim Visser and Bath's Kane Palma-Newport scored first-half tries as the hosts led 11-10 at the break.
Karl Dickson extended Quins' lead before Nathan Catt bundled over to put Bath back in front, but Swiel's third penalty secured the win.
Swiel replaced regular kicker Nick Evans after just 14 minutes - the veteran New Zealander going off with an injury on his 200th club appearance.
The 23-year-old proved to be no less accurate with the boot than Quins' all-time leading Premiership points scorer Evans, slotting the winning kick from 40 metres.
Bath, Premiership finalists in 2015, have been resurgent under new director of rugby Todd Blackadder this season, after finishing a disappointing ninth in 2015-16.
However, they went behind early when returning Scotland international Visser crossed in the corner, before big prop Palma-Newport crashed over just before half-time.
The game continued to switch from end to end after the break, Quins' Dickson flying over after a fine break from Marland Yarde, and Catt's converted try making it 20-18 to Bath 15 minutes from time.
But Swiel kept his cool to give Harlequins their fifth victory of the season and Bath slipped to third in the table.
Harlequins: Morris; Yarde, Alofa, Marchant, Visser; Evans (capt), Dickson; Lambert, Buchanan, Collier, Merrick, Matthews, Chisholm, Wallace, Clifford.
Replacements: Ward, Murphy, Jones, South, Naoupu, Mulchrone, Swiel, Walker.
Bath: Homer; Rokoduguni, Clark, Tapuai, Brew; Bowden, Allinson; Catt, Dunn, Palma-Newport, Garvey (capt), Attwood, Ellis, G. Mercer, Z. Mercer.
Replacements: Batty, Obano, Lahiff, Grant, Douglas, Homer, Hastings, Banahan.
Referee: Dean Richards.
For the latest rugby union news follow @bbcrugbyunion on Twitter.