At the full-time whistle Scott McTominay’s team-mates reached out to embrace him like he was a lucky charm and for a few minutes the only Scot in Manchester United’s team felt like the connection to a past when wins like this were always a possibility.

McTominay scored twice as a substitute and that was enough for an astonishing comeback in the style of the Sir Alex Ferguson years. The first in the third minute of time added on, the second four minutes later and Old Trafford was back in its happy place. The comebacks of this quality were once reserved for Champions League finals or epic derbies but at one goal down at home to Brentford with six defeats already this season you might say this was just as crucial.

Defeat, as Erik ten Hag surely knew, would signal the kind of form that gets a manager sacked. This was shaping up to be their third defeat in a row at home in the space of 18 days. Brentford had previously won once in the league all season, against Fulham on Aug 19. Casemiro was substituted at half-time and looked ready to get straight on a private jet to the Saudi Pro League. Last season’s golden boy Marcus Rashford was substituted for the third game in succession.

Of all five substitutes deployed by Ten Hag, McTominay was the last on 87 minutes. His first goal had been disallowed for offside but the next two rescued the day.

Ten Hag was without his entire first choice back four through injury. His team’s confidence in the passing game is gone. His goalkeeper Andre Onana, £47 million from Inter Milan, looked at fault for a goal once again.

Brentford manager Thomas Frank marshalled his resources shrewdly once Mathias Jensen had scored an opportunistic goal in the 26th minute. They stuck to their plan to pass the ball out from the back and looked confident doing so.

Not the same for United, for whom there was a pairing of Jonny Evans and Harry Maguire in central defence – both of them having the distinction of United having once negotiated their departure. Only Evans actually left. Ten Hag tried everything in the second half, including the substitution of Casemiro at half-time. On came Christian Eriksen, Antony, Alejandro Garnacho, Anthony Martial and finally McTominay.

A late equaliser was ruled offside for a touch from Martial. The plan by the end was to try to overwhelm Brentford by channeling the sheer scale of panic running through United. McTominay poached the first with a smart finish when a clearance dropped to him. The second was a header after Maguire had won the first. It was an astonishing finale.