Harlequins crossed twice in the final three minutes to pile on the misery for winless Castleford in their engage Super League clash at The Jungle as they ran out 22-16 winners.
Ex-Tigers skipper Danny Orr did the damage, going over once in the first-half and setting up late touchdowns for winger Jon Wells and skipper Rob Purdham.
That was cruel on pointless Castleford, who looked set to bounce back from the previous week's 12-try drubbing at Huddersfield after leading 16-12 going into the final stages.
Castleford drew first blood with a well-worked try from full-back and man of the match Ryan McGoldrick, who powered onto a cute inside pass from scrum-half Brent Sherwin after 11 minutes. Joe Westerman converted.
Harlequins levelled when prop Louie McCarthy-Scarsbrook steamed under the posts and Purdham added the extras. But six minutes later the Tigers were back in front when centre Kirk Dixon barged his way over in the corner after a neat switch of play in midfield.
Former Castleford favourite Orr put the visitors back in front on the half hour, with Purdham again on target, and it took a penalty from Westerman to level it up before the interval.
The visitors wasted a superb opportunity to take the lead early in the second-half when Purdham lost the ball over the try-line. And they paid the price after having full-back Mark McLinden sent to the sin bin when home half-back Luke Dorn sliced through.
McLinden had a chance to make amends after 67 minutes only for the Australian to spill the ball over the line.
But there was late drama as Quins won it at the death. Orr hacked on twice to set up the match-winning try for Wells, another former Castleford player, and off the final play of the game Purdham again profited from an Orr kick.