Four-times European champions Ajax were knocked out of the Champions League in the third qualifying round after a dramatic 3-2 defeat at home to Rapid Vienna.

Ajax – managed by former Rangers star Frank de Boer – were the favourites following a 2-2 draw in the first leg in Vienna, but they trailed 2-0 at half-time before hitting back to equalise only for Rapid to score again almost immediately to complete a 5-4 aggregate win.

Monaco, who beat Young Boys 7-1 on aggregate, Dinamo Zagreb and Apoel Nicosia, also progressed to the play-off round.

Robert Beric headed in from Stefan Stangl's cross to put Rapid ahead in the 12th minute after Ajax lost possession and Louis Schaub increased their lead six minutes before the break.

Ajax, fielding a starting line-up with an average age of under 21, pulled one back when Arkadiusz Milik volleyed home seven minutes into the second half.

Nemanja Gudelj equalised with a controversial goal in the 75th minute, firing home from the edge of the area as Rapid complained that goalkeeper Jan Novota had been fouled in the build-up.

But their protests turned to celebrations two minutes later when 20-year-old Schaub burst forward, held off three defenders and sent his shot into the top corner to stun De Boer and the Amsterdam Arena.

Monaco, quarter-finalists last season, produced a second-half blitz as Ivan Cavaleiro, Layvin Kurzawa, Anthony Martial and Stephan El Shaarawy scored in a 23-minute spell.

Croatian champions Dinamo Zagreb progressed on away goals despite squandering a three-goal lead at Molde.

Marko Pjaca, Arijen Ademi and Marko Rog scored in a devastating five-minute spell midway through the first half.

Etzaz Hussain and Mohamed Elyounoussi scored either side of the interval for the Norwegians, who then had Vegard Forren sent off before Ola Kamara levelled to set up a dramatic finale.

The Croatians survived to go through on away goals after a 4-4 aggregate draw.

Apoel, the only Cypriot team to have reached the quarter-finals of the Champions League, which they achieved in 2012, also went through on away goals despite losing 1-0 at home to FC Midtjylland.

Erik Sviatchenko scored in the second minute for the Danes who were eliminated following a 2-2 draw on aggregate.