Bayern Munich and 10-man Valencia both progressed to the last 16 of the Champions League following a 1-1 draw in Spain.
Valencia produced a solid performance after losing Antonio Barragan for a silly, studs-up challenge early on.
A deflected Sofiane Feghouli goal for the home side was cancelled out by a quick reply from Thomas Mueller, both goals coming towards the end of the second half.
After the earlier game in the group between BATE Borisov and Lille, which saw the French team surprisingly win 2-0 in Minsk, Valencia were already through and Bayern knew that a draw at the Mestalla would also see them through to the next round with a game to play.
The winner of the group will now be decided on the final matchday.
Bayern had the better of the opening exchanges but Valencia showed how dangerous they could be when their first set piece into the box was acrobatically finished by Ricardo Costa only for the referee to blow for a foul before the ball hit the back of the net.
Brazilian central defender Dante then came close for the visitors from a corner, drawing a great save from Vicente Guaita who dived low to his left to prevent Bayern taking the lead. Manuel Neuer then matched Guaita’s save with an excellent stop from Feghouli at the other end.
Dante would go on to be a constant threat from set pieces as the Germans won corner after corner and had the South American defender been more effective with his heading the visitors would have won easily.
Barragan upset the balance of the Valencia side when received a straight red for a flying lunge on David Alaba in the 33rd minute. The tackle looked worse than it actually was but it was a reckless challenge at best, especially as Barragan was already on a yellow.
Valencia actually improved after going down to 10 men, playing intelligently on the break with Tino Costa and Ever Banega finding gaps in the Bayern defence, the pair supplying the always dangerous Roberto Soldado.
An open start to the second half saw both teams looking to break the deadlock. Soldado brought another good save from Neuer and the excellent Aly Cissokho intervened on more than a couple of occasions for the home side to shut out the Germans.
As the game continued to follow its rapid-fire back and forth tempo Soldado should have done better than blaze over the bar when he went one-on-one with Neuer - after a great through ball from Tino Costa.
A good run and fortunate finish from Feghouli gave Valencia a deserved lead in the 77th minute when the Algerian burst past two static Bayern defenders to blast the ball towards Neuer’s goal, the shot taking a deflection off Dante’s hand and sending the keeper the wrong way.
Valencia’s lead was not to last for long though as Mueller slotted home calmly after a good cross from Philipp Lahm was diverted into his path inadvertently by substitute Mario Gomez.
MAN OF THE MATCH
Sofiane Feghouli: Valencia – Another bright Champions League performance from the young Algerian who capped a lively all-around performance with a deflected solo goal.
VALENCIA: Guaita 7, Barragán 7, Rami 7, Ricardo Costa 7, Cissokho 8, Banega 6, Tino Costa 8, Parejo 7, Feghouli 8, Guardado 7, Soldado 7. Subs: Jonas 6, Albelda 6, Valdez 6.
BAYERN MUNICH: Neuer 7, Alaba 6, Dante 6, Badstuber 6, Lahm 6, Schweinsteiger 6, Martinez 5, Mueller 7, Ribery 7, Kroos 5, Pizarro 5. Subs: Shaqiri 6, Mandzukic 6, Gomez 6.