Harlequins came from behind to secure a bonus-point win over local rivals London Irish, who suffered an eighth successive Premiership defeat.
The Exiles led 15-10 at the break through tries from Dan Norton and Ben Donnell, as Marcus Smith and Scott Baldwin crossed for Quins.
The visitors improved in the second half and took control after converted tries from Smith and Scott Steele.
A penalty try and Cadan Murley's late score put the gloss on the victory.
The final scoreline flattered Harlequins, but the result took Paul Gustard's men up to sixth in the table following defeats for Northampton and Gloucester in round 19 of the campaign.
Smith's first effort put Quins ahead but the Exiles came into the game after visiting scrum-half Steele was sent to the sin-bin.
Former England Sevens star Norton got his first try for Irish and Donnell was on hand to cross after picking up an offload from Jack Cooke.
A rolling maul drove Baldwin over for Harlequins' second score before a Jacob Atkins penalty gave Irish a five-point lead.
Quins almost levelled the scores right at the end of the first half, but a brilliant last-gasp tackle from Exiles winger Ollie Hassell-Collins denied Quins full-back Aaron Morris a try.
The visitors did forge ahead in the second period, with fly-half Smith finishing a flowing counter-attacking move to pass the milestone of 500 Premiership points.
As Irish's penalty count increased, Steele got the bonus-point score with a close-range finish from a five-metre scrum.
Quins are now on the brink of securing a spot in the European Champions Cup for next season after establishing a 13-point gap over ninth-placed Irish.
London Irish captain Jack Cooke:
"The boys are gutted as we were in that game for most of it.
"The scoreboard at the end is not pretty and not a true reflection.
"Ollie's tackle just before half-time was superb and we should have used it better to come out with more energy after the interval.
"We struggled for possession after half-time and I can't really explain why."
Harlequins head of rugby Paul Gustard:
"It is an 80-minute game and I thought we were good value for the victory as we were the dominant side.
"We couldn't get our set-piece going in the first half and if you lose as much possession as we did then it's impossible to sustain pressure.
"When we get good field position we are a dangerous side, but if you commit hari-kari then you will come under pressure.
"We want to try and win our last three games and finish as high as we can but our next fixture at Gloucester will be tough as they have been playing well since the resumption."
London Irish: Stokes; Norton, Neal, Cokanasiga, Hassell-Collins; Atkins, Meehan; Dell, Cornish, Hoskins, Donnell, Munga, Cooke (capt), Smart, Curtis-Harris.
Replacements: Atkins, Elrington, Chawatama, Nott, Moore-Aiono, Englefield, Macken, Homer.
Harlequins: Morris; Murley, Northmore, Lang, Earle; Smith, Steele; Garcia Botta, Baldwin, Kerrod, Lamb, Lewies, Lawday, Robshaw (capt), J Chisholm.
Replacements: Gray, Thomas, Collier, Hammond, White, Landajo, Esterhuizen, R Chisholm.
Sin bin: Steele (14).
Referee: Matthew Carley.