Real Madrid moved up to second place in La Liga with a dramatic 3-1 win over city rivals Atletico at the Wanda Metropolitano.

The visitors seized the initiative in an entertaining first period before sealing a victory which takes them within five points of leaders Barcelona.

Casemiro struck Real in front in the 16th minute with a superb overhead kick but Atletico, who had started the day in second, levelled nine minutes later through Antoine Griezmann.

Sergio Ramos wrapped up an entertaining first period by restoring Real's lead from the penalty spot.

Alvaro Morata almost marked his home debut for Atletico with a goal only to see it ruled out for offside, before Gareth Bale sealed the points with his 100th Real Madrid goal.

Atletico had Thomas Partey sent off 10 minutes from full-time for a second yellow card after a foul on Toni Kroos.

Getafe strengthened their grip on fifth place as they came from behind to claim a 3-1 win over struggling Celta Vigo.

Nestor Araujo gave the visitors a shock second minute lead but the game changed after Celta had Maximiliano Gomez sent off for his second yellow card in the 37th minute.

Jaime Mata's subsequent penalty pulled Getafe back onto level terms and second-half goals from Jorge Molina and a second from Mata sealed the hosts' comeback win.

Bottom club Huesca earned their second straight victory as they won 2-0 at fellow strugglers Girona to boost their unlikely survival prospects.

Ezequiel Avila scored both goals in a five minute spell just before half-time to sink Girona.

The hosts, who had defender Bernardo Espinosa sent off for a second yellow card halfway through the second period, have now lost seven straight games in all competitions.

Sergi Darder scored deep into stoppage time to snatch a 2-1 win for Espanyol at home to Rayo Vallecano.

The visitors led through Abdoulaye Ba's 33rd minute opener but Borja Iglesias equalised for Espanyol 13 minutes from time.