Mario Mandzukic's 59th-minute winner earned Juventus a 1-0 victory over Valencia that ensured the side booked its place in the knockout rounds.
The Bianconeri was stunned by Manchester United in Turin during its last group game but sealed its place in the last 16 with one game to spare on Tuesday, with Group H top spot now up for grabs on matchday six.
In a game of few chances, Mandzukic scored a tap-in in the second half after Cristiano Ronaldo had worked space to steer a cross to the Croatian striker.
United's last-gasp win over Young Boys means Valencia is out, with no way of reaching the last 16 even if it beats Mourinho's side at home in its final group game.
Juventus had been awarded two penalties in the reverse fixture with Valencia but Miralem Pjanic, the scorer of both of those spot-kicks, was denied another in the first half when he claimed he was pulled back by Geoffrey Kondogbia.
The Bianconeri dominated possession but struggled to conjure up chances and Joao Cancelo's outside-of-the-foot effort that went wide was as close as they came to a first-half goal.
It was Valencia who almost took the lead on the stroke of half-time, but Wojciech Sczcesny's brilliant one-hand save repelled Mouctar Diakhaby's header from a corner.
Juventus continued to look short of ideas until Ronaldo's moment of magic just before the hour mark.
The Portugal forward's stepover fooled Gabriel and gave him enough space to steer across a ball that Mandzukic turned home from close range.
Valencia thought it had hit straight back when Diakhaby got a touch to Dani Parejo's near-post free-kick.
However, the ball had clearly struck the defender's outstretched arm and rather than being credited with an equaliser, Diakhaby was punished with a yellow card from referee Willie Collum.
Neto denied Paulo Dybala, Ronaldo and Mandzukic a second Juve goal, but Valencia never looked like getting an equaliser at the other end as it exited the competition.
What does it mean? Juve through, but top spot not guaranteed
With Ronaldo now in its ranks, Juventus is considered one of the favourite for this competition and can now look forward to being in the last 16. However, United's late winner means it is not yet through as group winners, with Juve holding a two-point advantage with one game to go. The Italians must win its last game to be certain of sealing top spot.
Ronaldo exacts a measure of revenge
Ronaldo was controversially sent off against Valencia in the first meeting between the two, but he made a more positive contribution here with some fine skill to tee up Mandzukic for the winner. He also had eight shots on goal in a lively performance.
Valencia's tactics come back to haunt them
Valencia lacked attacking intent even after falling behind, registering only one attempt on target in the whole match. That may not have looked as costly when it was 0-0 at Old Trafford, but Marcelino's side went out with a whimper as soon as Marouane Fellaini struck in Manchester.
Valencia, which hosts United next month, does at least have the consolation prize of Europa League football in the new year, and Juventus round off its campaign at Young Boys eyeing first place. Domestically, Juve has a trip to Fiorentina on Saturday, while Valencia will hope to move into LaLiga's top half when it visits Real Madrid.
- Vijay Hazare Trophy 2023 LIVE Score, Round 3: Tamil Nadu beats Bengal by 5 wickets, Karnataka steady in chase of 144
- MotoGP: Marini replaces Marc Marquez at Honda on a two-year deal
- IPL 2024: Full list of players retained, released, traded by all teams ahead of auction
- IPL auction purse left: How much money do 10 teams have ahead of December 19 auction
- La Liga 2023-24: Avoiding relegation was Girona’s goal this season, now Spanish title contender has bigger dreams