Manchester United ended a bright pre-season campaign on a high when Marouane Fellaini grabbed an injury-time winner against Valencia.
Darren Fletcher's deflected strike was cancelled out by Rodrigo Moreno's sharp finish but Belgian midfielder Fellaini's late effort provided Louis van Gaal with a victory in his first game in charge at Old Trafford.
After a slightly subdued opening spell, Moreno released Sofiane Feghouli and Chris Smalling was required to make an important interception in the middle. Feghouli also produced a tame effort that David De Gea saved with ease while Diego Alves was equally as untroubled when Phil Jones got his head to a corner by Juan Mata that came off Rooney.
Rooney floated a free-kick over the bar and then spurned a golden chance to break the deadlock in the 33rd minute. Ander Herrera drilled the pass of the half to Ashley Young, who produced a first-time cross on the run towards Rooney. The captain was nudged by Antonio Barragan and a generous penalty was awarded by referee Jon Moss.
Rooney stepped up but struck Alves' right-hand post with the keeper guessing correctly with his dive. There was another opening for the England international before the interval but he was unable to gather a long ball through by Fletcher.
It was Fletcher who struck, four minutes into the second half, to cheer the Stretford End behind the goal. Young's corner was dummied by Herrera at the near post and the ball broke to the Scotland skipper on the edge of the area. A deflected shot, through a crowd of players, beat the grounded Alves