Manchester United's victory at Crystal Palace may have been unconvincing, but Louis van Gaal's men will not mind after edging closer to a Champions League return.
United arrived at Selhurst Park on the back of three defeats without so much as a goal, keeping alive Liverpool's slim hopes of wrestling fourth place.
And there will have been a renewed sense of optimism on Merseyside when Jason Puncheon cancelled out Juan Mata's dubious opener, yet United rode their luck to triumph 2-1 as Marouane Fellaini capitalised on a collision between Julian Speroni and Damien Delaney.
The 78th-minute header was a sucker punch for Alan Pardew's side, who had responded so impressively after Mata coolly slotted home a first-half penalty.
The handball decision against Scott Dann infuriated the home faithful, whose anger went up a notch when Puncheon's penalty appeal against Mata was ignored.
That frustration soon turned to elation, though, as the substitute fired home a free-kick, via a slight deflection off Daley Blind, to pull Palace level and them in the ascendancy.
However, David de Gea ensured there was not to be a fourth straight loss for United, with his heroics allowing Fellaini to head home a vital winner after a mix-up between Speroni and Delaney.
This win was far harder than many expected after a bright start from the visitors, with just eight minutes on the clock when a 25-yard Blind effort was tipped onto the post by Speroni.
Ander Herrera swung over wildly as United continued to edge the early exchanges and, after Glenn Murray's wayward header at the other end, they won a penalty.
Dann was adjudged to have handled Ashley Young's whipped cross from the left and Mata kept his composure to coolly slot home.
Mile Jedinak, back in the starting line-up, came close to levelling with a powerful header, which was soon followed an intricate free-kick routine that was closed off just in time by United.
Joel Ward saw a penalty claim waved away as the noise rose inside Selhurst Park, which continued after Luke Shaw left the field on a stretcher following lengthy treatment.
The left-back came off after having seemingly been caught by Murray, leading to Jonny Evans' introduction towards the end of a first half which Wayne Rooney appeared to be nursing a thigh complaint.
The England captain stayed on, though, and would have almost certainly doubled United's lead had Delaney not bravely from close range.
It proved Rooney's last involvement of note after Radamel Falcao came on for the second half, with Puncheon replacing Joe Ledley for the hosts.
Pardew's men started the sharper when play resumed and there were loud appeals for handball against Herrera after Yannick Bolasie's cross.
Murray hit into the side-netting soon after before Michael Oliver rejected another appeal for a spot-kick, with Puncheon going to ground after tying the United defence in knots.
The substitute appeared to be caught by Mata yet and his fury at not getting a penalty was echoed by the supporters, who were now making a point of cheering every decision that went their way.
Chris Smalling's foul on Murray was one such moment and one which changed the match. Puncheon stepped up to the free-kick and bent the ball around the wall, with the ball flying past De Gea via a slight touch off Blind.
Selhurst Park was now abuzz with excitement and James McArthur came close to capitalising on a United mishap, flicking just wide with the outside of the foot.
So impressive were Palace that it was hard to tell which side was chasing European football and United had De Gea to thank for keeping it level when Murray was put through one-on-one.
The Spaniard was soon forced to follow-up that exceptional, one-handed save to deny a volley from former team-mate Wilfried Zaha, before United threatened at the other end as Young's low strike was deflected narrowly wide.
The winger soon provided the winner. Fellaini darted towards the box after playing the ball out wide to the rejuvenated winger, whose deep cross did not look problematic until Delaney collided with Speroni, allowing the Belgian to head home.
It was a gut punch Palace tried to recover from, with De Gea called into action once more after Murray impressively wriggled free of Paddy McNair.
Speroni did well to tip over a Herrera strike two at the other end following a Falcao one-two - the last moment of note in a pulsating, end-to-end encounter.