Harlequins ground out a hard-earned win over Bath in the Heineken Champions Cup at Twickenham Stoop.
Quins fly-half Marcus Smith kept the scoreboard ticking with three first-half penalties to hand the hosts the advantage in soggy conditions.
Smith added a fourth after the break but the visitors' confidence grew after Freddie Burns kicked two penalties.
James Lang kicked Quins out of reach and above Bath into third in Pool Three despite a late Burns penalty.
The hosts, who were heavily beaten by Clermont Auvergne in their opening European game last week, were dominant up front in the early exchanges.
England prop Joe Marler made his first appearance since the World Cup and was influential in handing his side a platform.
Twenty-year-old Smith was immaculate off the kicking tee to reward Quins for their dominance by opening up a nine-point gap at the interval.
Bath were better after the break as they eradicated some of the errors and Smith's opposite number Burns kicked two penalties to reduce the deficit.
But when Marler demonstrated his experience to win a penalty at the breakdown just inside the Bath half, centre Lang stepped up to land a huge penalty and end Bath's challenge.
Burns added another three points moments later, but ultimately the visitors fell short by conceding 13 penalties compared to Quins' three.
'We should have scored more' - what they said
Harlequins head coach Paul Gustard told BT Sport: "The joys of victory aren't as deep as the despairs of defeat, I feel more relief than happiness. I thought we were dominant and our set-piece was good but we should have scored more points than we did.
"We are a young coaching group in terms of experience, and we looked at things we could fix like ball retention. It's a simple game and if we can run hard and keep the ball we will be a good team."
Bath director of rugby Stuart Hooper told BT Sport: "The conditions were ropey but we have to adapt. Ultimately, we didn't hold on to the ball and we were not disciplined, the penalty count was 13-3 and it's difficult to win games playing like that.
"We got ourselves in decent positions in the second half but coughed up pressure by giving the ball away."
Teams
Harlequins: Brown; Chisholm, Campagnaro, Lang, Murley; Smith, Care; Marler, Elia, Collier, Lewies, Symons, Robshaw, Evans, Lawday
Replacements: Head, Garcia Botta, Kerrod, Cavubati, Kunatani, Saunders, Lasike, Ibitoye
Bath: Watson; Rokoduguni, Joseph, Wright, McConnochie; Burns, Cook; Boyce, Walker, Judge, McNally, Ewels, Stooke, Bayliss, Louw
Replacements: Dunn, Obano, Stuart, Garvey, Davies, Chudley, Priestland, Roberts