Manchester United lost their perfect UEFA Champions League defensive record but still managed to claim top spot in Group C thanks to Anderson's second-half equaliser.
United had the better of an entertaining contest but a succession of failures in front of goal looked set to cost them dear when Pablo Hernandez rifled the visitors in front after half an hour. It was the first goal United had conceded in this season's Champions League and might well have proved very costly had it pitched them into combat with one of Europe's heavyweights in next Friday's draw.
But they found an unlikely hero in Anderson, who netted only his second goal for the Red Devils when he latched onto the rebound after Vicente Guaita had saved Park Ji-sung's thunderbolt. It was not all good news for the hosts, who lost Rio Ferdinand five minutes after the break, which is a worrying development ahead of key English Premier League clashes with Arsenal and Chelsea before Christmas.
Ferguson said he was relieved to have ensured avoiding the bigger guns. "Well we could have won the match tonight but their keeper made some brilliant saves," he said. "Berbatov especially could have scored five (like he did in the previous Premier League home game) but he missed with two headers and the others were saved."
Ferguson had spelt out the requirement yesterday. Already through to the last 16 was not good enough. Only a group win would satisfy the United chief, who knew Barcelona and Real Madrid headed the list of teams lying in wait should his side fail to collect the point they needed.
On a freezing night, when the five Portuguese officials opted to wear tracksuit bottoms and gloves, the message did not appear to have been rammed home effectively enough. Although United dominated possession, Valencia were afforded plenty of space too, with Alejandro Dominguez a particular threat.
So, once Anderson had spurned the glorious opportunity Wayne Rooney afforded him with a fabulous return pass, Dimitar Berbatov had failed in a different way to get round Vicente Guaita and the Valencia keeper had blocked a goalbound Park effort with his legs, the hosts were ripe for being picked off.
Not that Valencia can claim all the credit. Michael Carrick will cringe should he ever watch the build-up again. The England midfielder almost had too much time to make up his mind what to do with the ball when he collected possession 35 yards from his own goal. He was still making up his mind when Dominguez stole in, nicked possession, then ran straight at Nemanja Vidic before rolling a square pass to Hernandez.
The midfielder steadied himself, then drilled a low shot through the legs of Ben Amos, starting only his third senior game and his first in Europe, Ferguson having decided to offer the 20-year-old a surprise opportunity.
Within a couple of minutes, United had nearly produced the perfect equaliser. Rooney may no longer look like a shadow of his old self but his wait for a goal in open play goes on. The memory of that first-minute strike against Bayern Munich last March is starting to fade from the memory, so the celebrations would have been long and loud had his stunning 20-yard curler found the net instead of striking the underside of the bar.
United suffered a further setback within five minutes of the restart when Ferdinand gingerly made his way off. Although Ferguson had a competent replacement in Chris Smalling it was definitely not what the hosts wanted to see ahead of such a pivotal period and they can only hope the decision was precautionary.
Rooney appeared to be a man on a mission and two attempts to set up Berbatov came to nothing. In fact, when it arrived, the equaliser came from a very unexpected source. For a player with only one goal from his previous 108 United appearances, Anderson showed admirable attacking instinct to follow in Park thunderbolt strike that the overworked Guaita had been unable to hold. The young Brazilian could not miss this one and gleefully tapped home the rebound from close range before embarking on a double celebration that obviously needs some work.
United did not have a clear run to the final whistle. Twice Amos was forced to make important interventions as Valencia threatened a second. It did not come, although Ferguson will note with interest the presence of the holders Inter Milan, currently coached by old foe Rafael Benitez, are now potential last 16 opponents.