David Howell and Luke Williamson scored second-half tries as Harlequins earned an important two points in the engage Super League by seeing off Wakefield.
The hosts upped the ante after a tight first half, increasing the tempo and pulling away from the scrappy visitors.
With both sides having strong play-off aspirations it was always likely to be a close contest, and that was in evidence in a see-saw first half that saw the lead change hands four times.
Wakefield were first on the scoresheet when Danny Sculthorpe span the ball wide allowing Danny Brough to sprint through the gap and touch down.
With strong wind and driving rain making things difficult both sides opted for safety-first rugby and were content to play out their sets.
Quins struck back midway through the half when Luke Williamson broke through a gaping hole, feeding Luke Dorn to skid over.
But that lead lasted mere seconds, as from the kick-off the Wildcats snaffled possession and Richard Moore stepped inside to cruise over under the posts.
The hosts rallied again and both Danny Orr and Tony Clubb went close before Will Sharp gathered an Orr kick to dive over.
With the hooter blowing for half-time, Brough reduced the gap to a point with a neatly-struck drop-goal.
It was Quins who came out fired up in the second half and they deservedly stretched their lead when a skidding Orr kick was touched down by a sliding Howell.
And with Wakefield now making the mistakes, the hosts further profited when Williamson burrowed over after Chad Randall ran on the last tackle.
But Wakefield were not done yet, and after being camped on the hosts' line Tony Martin grabbed a try when he charged through a gap thanks to a Brough pass.