Catalans Dragons were forced to work for their second successive appearance in the last eight of the Carnegie Challenge Cup in an entertaining fifth-round tie at Whitehaven.
The Cumbrian part-timers, roared on by a passionate 3,000 crowd, dominated the match for long periods but the Dragons did just enough to avoid a shock result.
It means Super League clubs will occupy all eight spots in Tuesday's quarter-final draw but Whitehaven had their moments and emerged with considerable credit.
The Cumbrians, who provided the man of the match in scrum-half John Duffy, made life difficult for themselves by three times failing to find touch with penalty kicks and crucially conceded tries either side of the interval.
It looked plain sailing when some intricate passing by Stacey Jones and Clint Greenshields opened up the home defence for stand-off Thomas Bosc to race through for a sixth-minute try.
They missed other clear-cut chances, too, before half-time with forwards Julien Touxagas and Alex Chan both knocking on in scoring positions but were fortunate to lead 12-4 at the break after being outplayed for long periods.
Whitehaven made excellent use of the stiff breeze at their backs but failed turn their pressure into points.
Speedy left winger Craig Calvert raced onto Duffy's kick on the first tackle to score a 29th-minute try while the Catalans down a man short through the sin-binning of hooker Kane Bentley for persistent laying-on in the tackle.
Centre Rob Jackson twice reached the line but lost his grip on the ball the first time and then had a try disallowed for a double movement.
And it was entirely against the run of play when the French increased their lead four minutes before half-time, when Lionel Teixido and Cyrille Gossard combined to get left winger Vincent Duport over for a well-worked try, to which Bosc added his second goal.
A 12-4 lead suddenly resembled a stranglehold when a downpour at the start of the second half reduced both team's handling to a lottery.
The visitors were gifted a try within five minutes of the restart when full-back Gary Broadbent uncharacteristically fumbled Jones' kick on his own line and former Canberra centre Adam Mogg pounced on the loose ball.
Chances were few and far between throughout the rest of the match, until a late flurry of activity.
Jones missed a clear-cut chance when he knocked on following John Wilson's break and Whitehaven grabbed a lifeline when Jackson profited from Justin Murphy's failure to clear Duffy's dangerous kick to touch down.
Bentley then pounced on a loose ball at the other end but Whitehaven had the final say when right winger Steve Maden grabbed a last-minute try after successfully chasing his own grubber kick.