Cristiano Ronaldo struck a last-gasp winner for Real Madrid, Diego Costa hit another double for Atletico Madrid and there were comfortable wins for Barcelona and Villarreal as the top four in La Liga all won at the weekend.

Ronaldo’s deflected shot four minutes into stoppage handed Real Madrid three points they scarcely deserved against a spirited Levante side that twice squandered the lead. Los Blancos looked jaded in a goalless first-half, while Levante were unrecognisable from the team that lost 7-0 at Camp Nou on the opening day of the season.

Babacar Diawara put Los Granotes in front on 57 minutes, only for Sergio Ramos to reply within four minutes. Substitute Nabil El Zhar’s brilliant solo effort with only four minutes left looked to have won it for Joaquin Caparros’ men, but Alvaro Morata, who had replaced Isco stabbed in an equaliser in the 90th minute before Ronaldo’s late show.

Barcelona coach Tata Martino rested several players and was without Lionel Messi as La Blaugrana went behind to an early Real Valladolid goal from Javi Guerra. The lead lasted barely four minutes, however, as Alexis Sanchez levelled for the Catalans. Barca upped the tempo after the break with Xavi putting them ahead and Alexis extending the lead with his second, before Neymar rounded off the scoring to secure an emphatic 4-1 win to maintain Barca’s 100 per cent record.

Atletico Madrid maintained parity with Barca, overcoming Celta Vigo 2-1 at the Vicente Calderon. Diego Costa scored either side of half-time to take his total for the season to eight, equal with Messi at the top of the scoring chart. Nolito halved the lead with 20 minutes remaining, but Diego Simeone’s side were always too strong for the northerners.

Villarreal eased to a 3-0 win over Granada at El Madrigal. Bruno put the Yellow Submarine ahead after half an hour and Giovani Dos Santos doubled their advantage shortly after the break as El Grana offered little threat. Tomas Pina made it three late on to keep Villarreal in fourth place, two points behind Real Madrid. 

Getafe continued their fine form with a resounding 3–1 win over Real Betis. They were three up after half an hour and the game was effectively over. Pedro Leon scored twice, the first a spectacular free kick and Adrian Colunga added a third. Betis improved after the break, but had only a Rafael Lopez own goal to show for it.

Getafe’s win meant they climbed to fifth, ahead on goal difference of Athletic Bilbao and Valencia who shared the points in an entertaining 1-1 draw at San Mames. Ever Banega put Valencia in front from the penalty spot two minutes ahead of half-time after Sofiane Feghouli was brought down by Aymeric Laporte. Athletic upped their game in the second half, Mikel Rico equalising to give the Basques a deserved point.

Elche climbed to mid-table with their second win of the campaign, defeating Espanyol, whose early season form is fading fast. Coro opened the scoring for the Segunda champions just before the break and, although Thievy Koulossa equalised for Los Periquitos, Victor Sanchez made life harder for them after receiving his second yellow card. Coro grabbed his second and what proved to be Elche’s winner.

Two of the bottom three enjoyed rare victories. Osasuna registered their first triumph on the road at inconsistent Malaga to ease the pressure on under-fire boss Javi Gracia. Oriol Riera’s first-half goal at La Rosaleda was enough to give Los Rojillos only their second win of the campaign overall and nudge them up to 18th in the table.

Rayo Vallecano and Real Sociedad looked to be heading for stalemate until Jonathan Viera was fouled by goalkeeper Claudio Bravo in the 88th minute. The striker made no mistake from the penalty spot to double Rayo’s points tally and take them off the bottom of the table, while La Real coach Jagoba Arrasate was left to rue a host of missed chances.

Rayo’s place was taken by Almeria, who succumbed to a stoppage time winner from Sevilla’s Ivan Rakitic in an all-Andalusian clash at the Sanchez Pizjuan. Kevin Gameiro gave Sevilla the lead after only six minutes, but Almeria hit back when Rodri netted his fourth of the season 17 minutes later. Los Rojiblancos looked to have won a hard-fought point until Rakitic’s late strike left them bottom and the only side yet to notch a win.

Here are all of the goals from gameweek 8 of La Liga action: