MANCHESTER, England — Ralf Rangnick celebrated as though he had just won the Champions League for Manchester United when Marcus Rashford tapped home Edinson Cavani‘s cross from two yards, three minutes into stoppage time, to secure a 1-0 victory against West Ham at Old Trafford.

Man United’s interim manager turned to the directors’ box with both arms aloft and punched the air repeatedly as the players on the pitch raced to congratulate Rashford following his second goal in two games. Rangnick was so animated because his team had just turned a disappointing draw into a potentially crucial victory — one that ensured United climbed above West Ham and into the top four for the first time since Oct 2.

But the man charged with stabilising the team following Ole Gunnar Solskjaer’s dismissal as manager in November had another reason to celebrate Rashford’s goal: For the second successive game, the former RB Leipzig and Hoffenheim coach had made a big call with his substitutions and got it right.

At Brentford on Wednesday, Rangnick sparked an angry, even petulant, reaction from Cristiano Ronaldo when substituting the 36-year-old for Rashford. Six minutes later, Rashford scored United’s third goal in a 3-1 win to make the game safe and enable Rangnick to explain to Ronaldo, in full view of the television cameras, just why he was right to make the change, regardless of the former Real Madrid forward’s status as a football icon.

And as United toiled away against David Moyes’s West Ham, Rangnick boldly chose to go all-out attack in a bid to find a goal in the closing stages. Having replaced Anthony Elanga with Rashford on 62 minutes, Rangnick threw on Cavani and Anthony Martial for Fred and Mason Greenwood in the 82nd minute, and instructed United to operate a 4-2-4 formation. It was win-or-bust, and almost went bust when Tomas Soucek headed inches wide on 87 minutes, but Rangnick’s gamble paid off when all four forwards linked together in the same move for Rashford to score the winner.

“Those are the best kind of wins, when the other team has not time to come back,” Rangnick said. “We had to take some risks in the last 15 minutes but in the end I wanted to show the players it is about winning this game and I’m more than happy we scored the goal in the last minute.”

Moments like that matter for a manager when he is trying to gain the trust of a new group of players. If you take a risk and it backfires, the players question your judgement, but if it comes off, it certainly helps to dilute any doubt that may have taken hold in the dressing room.

Rangnick still has plenty to do at Old Trafford to secure the full, unequivocal support of his players and, considering he is only likely to be in charge until a permanent manager is appointed this summer, he may never get close to universal backing. But in a slow, painstaking manner, the 63-year-old is gradually steadying the ship at United, even if it can still be hard to watch at times.

Under Rangnick, United have lost just once in 10 in all competitions — a 1-0 defeat at home to Wolves earlier this month. Yet, they have managed to score just seven goals in six home games — and three of those came against Burnley, the Premier League’s bottom team. Man United have conceded just seven goals in 10 games under Rangnick too, and tightening up at the back was crucial with Solskjaer’s side conceding a staggering 25 goals during his final 10 games in charge.

Rangnick has turned off his side’s dripping tap in defence, but the downside is that it has created a drought of chances and goals at the other end of the pitch. Against West Ham, Manchester United had 18 efforts on goal, but only three hit the target — with such a poor conversion rate, it is no surprise that they are finding it difficult to beat teams comfortably.

Ronaldo, for instance, has scored just two goals in sevem appearances under Rangnick and one of those was a penalty. He played in a central role against West Ham and did little to affect the game. His main contribution was heading the ball at the near post when defending corners and, as important as that is, it is not why Ronaldo was brought back to the club last summer.

The key to any successful football team, however, is a solid defence. Once those foundations are in place, a team can break forward and attack with the confidence that they are safe to leave gaps at the back. Man United aren’t at that stage yet, but progress is being made and Rangnick is able to look ahead to the international break having seen his team win back-to-back games for the first time since he took charge in December.

The race for fourth is intense, with Man United, West Ham, Arsenal, Spurs and Wolves separated by just four points, but Man United have a run of fixtures in February that give them the opportunity to pull clear of some of their rivals. They face Burnley, Southampton, Leeds and Watford next month before a daunting March against Manchester City, Tottenham and Liverpool, but Man United are in a better place than they were when Rangnick arrived, so there are positives to focus on.

And everything looks better after a stoppage time victory, no matter how uninspiring the performance may have been.