Bayern Munich, Inter Milan and Benfica sealed their places in the knockout phase of the Champions League Tuesday as the qualification hopes of the two Manchester clubs were left hanging in the balance. Bayern beat Villarreal 3-1 to guarantee top spot in Group A with one round remaining, France winger Franck Ribery scoring two of the German team's goals. Inter, the 2010 champion, qualified for the last 16 before a ball was kicked in its match at Trabzonspor, courtesy of Lille's earlier 2-0 win at CSKA Moscow in Group B. The Italians secured first place, however, by drawing 1-1 in Turkey. Benfica ensured a top-two finish in Group C by drawing 2-2 at three-time winner Manchester United, which now needs at least a point at Basel — which defeated Otelul Galati 3-2 — in its final game to advance to the knockout stages for the sixth year in a row. Manchester City, which is blazing a trail at the top of the Premier League this season, is in a worse position after losing 2-1 at Napoli thanks to a brace of goals by Uruguay striker Edinson Cavani. The result leaves Napoli a point ahead of City in Group A, knowing a victory at already-eliminated Villarreal will ensure the Italian side finishes second behind Bayern. Real Madrid, which entered matchday five as one of three teams to have already qualified, thrashed Dinamo Zagreb 6-2 to keep its perfect record in Group D, where Ajax drew 0-0 at Lyon to virtually guarantee the Dutch team's progress. With reigning champion Barcelona and seven-time winner AC Milan also sure of progression, the lineup for the last 16 is already looking enticing. However, it may still be without the two current best teams in England. United, which without England striker Wayne Rooney (hip) had only itself to blame for the goals conceded at Old Trafford. Defender Phil Jones turned the ball into his own net to gift Benfica a third-minute lead and goalkeeper David de Gea failed to clear his lines properly in the 60th, allowing Pablo Aimar to make it 2-2 barely 60 seconds after Darren Fletcher had put United ahead for the first time. Dimitar Berbatov — with his first goal in Europe in three years — had earlier equalized in the 30th. While United's future is in its own hands, City has to beat Bayern in its final game and also rely on Napoli slipping up in Spain. Cavani scored goals either side of Italy striker Mario Balotelli's equalizer to extend Napoli's unbeaten run at home to 11 matches since returning to continental competition in 2008 after 13 years out. Mario Gomez scored the other goal for four-time winner Bayern, which maintained its unbeaten record in the group and stayed on course to reach the final on its Allianz Arena home in May. Halil Altintop's equalizer for Trabzonspor denied Inter a fourth straight victory and kept alive the Turkish side's hopes of reaching the last 16 of a competition it only joined after Fenerbahce was removed because it was under suspicion for match-fixing. Ricardo Alvarez opened the scoring for Inter, which belied its poor form in Serie A by qualifying in the Champions League with a match to spare. In Madrid, Karim Benzema and Jose Callejon both scored twice while Mesut Oezil and Gonzalo Higuain scored the others as Jose Mourinho's side clinched its 12th straight win in all competitions. However, goals by Fatos Beqiraj and substitute Ivan Tomecak meant Dinamo stopped Madrid from becoming the first club to finish group play without conceding. Ajax's draw in France leaves it three points ahead of Lyon and with a vastly superior goal difference.