• Game was Eintracht manager’s last before taking over at Bayern • Real Madrid finish third in La Liga after draw with Villarreal

Niko Kovac left Eintracht Frankfurt the perfect parting gift with victory against his future employers Bayern Munich in the DFB-Pokal final. Kovac delivered the cup, and with it European football next season, in his final game in charge before replacing Jupp Heynckes as Bayern manager this summer as Frankfurt won 3-1 in Berlin.

Ante Rebic scored either side of Robert Lewandowski’s equaliser, with his second goal after 82 minutes surviving a VAR check by the referee after Bayern appealed for a handball in the build-up. That was not the end of the replay drama, however, as Frankfurt survived another review in injury time when the referee decided that Kevin-Prince Boateng’s kick on Javi Martínez was not worthy of a penalty.

With Bayern still seething and their goalkeeper Sven Ulreich up for a corner, Frankfurt broke and the substitute Mijat Gacinovic raced clear of two opponents to roll the ball into the empty net and spark wild celebrations with his team-mates and supporters.

While it was the perfect send-off for Kovac, it denied Heynckes a Bundesliga and cup double on his farewell as Frankfurt claimed their first title for 30 years following defeat in the final 12 months ago. Bayern will feel two huge decisions went against them and were left to rue chances from Lewandowski and Mats Hummels which struck the crossbar.

Real Madrid blew a two-goal lead to draw 2-2 with Villarreal in their final La Liga match before the Champions League final against Liverpool. The Real coach, Zinedine Zidane, handed a debut to his 20-year-old son Luca as first-choice goalkeeper Keylor Navas was rested before the European clash in Kiev on 26 May, but he otherwise named a strong side.

Gareth Bale, deployed in a central role, broke the deadlock after 11 minutes to score for the fourth La Liga match in a row, with Cristiano Ronaldo adding a second just after the half hour to put the visitors in control. Villarreal, though, mounted an unlikely comeback when the substitute Roger Martínez fired in with 19 minutes left before another sub, Samu Castillejo, beat the offside trap, rounded Zidane and secured a dramatic draw. The result means Real will finish third behind the champions Barcelona and second-placed Atlético Madrid, who host Eibar in their La Liga finale on Sunday.

Maxi Gómez and Iago Aspas scored two goals apiece as Celta Vigo finished the season with a 4-2 home victory against in-form Levante. Paco López’s visiting Levante side had banished any relegation concerns on the back of an impressive five-match winning sequence – including ending Barcelona’s long unbeaten run last weekend – and they took an early lead through Rubén Rochina.

However, Celta, who announced on Saturday that Juan Carlos Unzué will not be continuing as coach, mounted an impressive response. Gómez struck either side of Aspas’s double to put the result beyond doubt with a little over an hour on the clock, before José Luis Morales scored a consolation for Levante 15 minutes from time.

There were also plenty of goals at the Estadio Municipal de Butarque where Leganes were 3-2 winners against Real Betis, despite playing much of the match with 10 men. The Betis forward Joel Campbell opened the scoring after 20 minutes before things got worse for the hosts with a red card for Diego Rico four minutes later. But the 10 men rallied and goals from Dimitris Siovas and José Naranjo turned the game on its head. Antonio Sanabria levelled things after 76 minutes but the hosts would not be denied and Nordin Amrabat netted the winning goal shortly afterwards.

Cristhian Stuani scored both of Girona’s goals as they finished the campaign with a 2-1 win at relegated Las Palmas, who had levelled through a Jonathan Calleri penalty. Loïc Rémy’s penalty gave Getafe a 1-0 win at the bottom club Málaga while Wissam Ben Yedder was on target as Sevilla won by the same scoreline at home against Alavés.