Manchester United triumphed in Louis van Gaal's first home match as manager as substitute Marouane Fellaini's late goal saw them defeat Valencia 2-1 at Old Trafford.
Fellaini, introduced with just under 15 minutes remaining for his first appearance of pre-season, capitalised on a mix-up in the Valencia defence to turn the ball home in stoppage time.
The Belgium midfielder, not previously involved under Van Gaal this summer having been rested due to his involvement in the latter stages of the World Cup, struggled last term and has been linked with a move to Napoli.
It will be interesting to see how his United career develops from here as Van Gaal takes the club forward.
Rodrigo Moreno, making the most of ponderous United defending, had earlier made it 1-1 by firing in from close range in the 71st minute when the ball was inadvertently sent his way from a free-kick by the outstretched leg of Tom Cleverley.
Darren Fletcher's deflected 49th-minute strike put the Red Devils in front after their captain-for-the-night Wayne Rooney missed a penalty in the first half, hitting the post.
It was a far from vintage display from United, who may well count themselves fortunate not to have been beaten by their Primera Division opponents.
But they head into Saturday's Barclays Premier League opener against Swansea at the same ground off the back of an impressive pre-season record.
Prior to this game, United had emerged victorious from each of the other five friendlies Van Gaal had been in charge for, beating Los Angeles Galaxy, Roma, Inter Milan (on penalties), Real Madrid and Liverpool.
And in contrast to the gloom of last term, there is a definite sense of renewed optimism growing at United since the Dutchman took charge.
That was certainly apparent in the warm reception a waving Van Gaal received from the stands as he headed for the dugout just prior to kick-off.
Amid reports linking United with Sporting Lisbon's Argentina defender Marcos Rojo, Van Gaal named a starting XI showing two changes from that which had lined up for their last friendly, the 3-1 win over Liverpool that concluded their tour of the United States.
The adjustments saw 20-year-olds Tyler Blackett and Reece James coming in for Jonny Evans and Antonio Valencia - both out with injury.
Van Gaal once again used the 3-4-1-2 formation he has done in every pre-season game so far and Rooney, skipper again as he had been against Liverpool, was paired with Javier Hernandez up front, Juan Mata operating just behind.
The game was played at a fairly pedestrian pace in the early stages, with the visitors doing any probing there was.
At the other end, Mata saw goalkeeper Diego Alves smother a free-kick just before the half-hour mark.
The Spain forward - a former Valencia player - then delivered a corner which came to Phil Jones, whose header made for an easy catch for Alves.
A minute later, Ander Herrera met an attempted clearance first time outside the box and volleyed wide.
The tempo seemed to be increasing slightly and the away side called David de Gea into action as Sofiane Feghouli fired low at the United stopper from the edge of the area.
Valencia skipper Dani Parejo sent a free-kick off-target and his counterpart Rooney then did likewise, albeit going closer, moments before earning the penalty as he jumped to meet an Ashley Young cross.
Referee Jon Moss adjudged that it had been a foul from Antonio Barragan that sent Rooney sprawling to the turf while the ball came over, and pointed to the spot.
But the England striker could not convert the opportunity, seeing his shot - possibly helped on its way by the faintest of touches from Alves, who had dived the correct way - crack against the upright.
United made the breakthrough shortly after the restart as Young's corner came out to Fletcher, who saw his side-foot effort loop over Alves off a Valencia defender.
Rooney found himself in the clear moments later, but failed in his attempt to tee up a team-mate, and Van Gaal then made a raft of substitutions.
James remained on the field and saw a deflected effort loop in Alves' arms, but it was Valencia who struck two minutes later when Rodrigo, once on loan at Bolton, responded sharply as the free-kick sailed in his direction via Cleverley and rifled into the roof of the net at the back post.
Pablo Piatti then missed from close range before Hernandez cleared a fierce strike off the line.
But Fellaini and compatriot Adnan Januzaj - another making his pre-season bow after the World Cup - were thrown on in the 76th minute and soon made an impact.
Januzaj fed Rooney, who missed from the edge of the box with a turn and shot.
United subsequently survived a scramble when De Gea spilled a shot, and having cleared up on that occasion, Blackett then delivered a long ball in the last few seconds which sent Alves colliding into one of his defenders.
The loose ball fell to Fellaini, who made no mistake.