European champions Real Madrid surrendered a two-goal lead as they crashed to a shock 4-2 defeat at Real Sociedad in the second round of the Primera Division season.

Madrid, who were without Cristiano Ronaldo, had looked set to sweep Sociedad aside as they struck twice inside the opening 11 minutes through Sergio Ramos and Gareth Bale while in between also hitting the woodwork through the Spain defender.

The visitors also had a number of other chances to increase their lead before Sociedad staged a stunning comeback that saw them snatch the victory through goals from Inigo Martinez (36), David Zurutuza (41 and 65) and Carlos Vela (76).

That earned Sociedad their first points of the new season and came at the end of a week which saw them beaten by top-flight newcomers Eibar and knocked out of the Europa League on Thursday by Krasnodar.

It was Madrid's first league loss, having limped past Cordoba at the Bernabeu in their opening match, and left them three points behind Barcelona after their arch rivals edged past Villarreal 1-0 on Sunday.

Sandro, a 19-year-old academy graduate, climbed off the bench to net an 82nd-minute winner at El Madrigal, the youngster tapping in a cross from Lionel Messi for his first senior goal.

A former Barca player helped Deportivo La Coruna pick up their first point as Isaac Cuenca kept his cool to slot home a stoppage-time penalty and salvage a 2-2 draw for his new side at home to Rayo Vallecano.

Depor were beaten 2-1 in their season-opener at Granada last weekend after losing an early lead and it looked set to be an identical story on Sunday as Alberto Bueno's brace for Rayo cancelled out Jose Rodriguez's opener for the hosts.

However, with three minutes of added time almost up, Depor won a penalty when Abdoulaye Ba handled in the box and Cuenca - who left Barca this summer by mutual consent - stepped up to help the promoted side get their campaign up and running.

There was also a last-gasp equaliser in Sunday's other match as Elche snatched a point at home to Granada in a 1-1 draw.

Granada had looked set to make it two wins from two when they took an 82nd-minute lead through Fran Rico but David Lomban's stoppage-time leveller saw the spoils shared.

On Saturday, Atletico Madrid recorded their first win of the season but were run alarmingly close by newcomers Eibar in a 2-1 win at the Vicente Calderon.

The defending champions looked to be cruising when goals from Miranda and Mario Mandzukic, who scored his first league goal since joining from Bayern Munich over the summer, gave them a cushion on home soil.

But Abraham pulled one back for newly-promoted Eibar and they could have snatched a point in the dying minutes but for a timely intervention from goalkeeper Miguel Moya to deny Angel Rodriguez.

Athletic Bilbao got their first win of the season at the second time of asking as they comprehensively beat Levante 3-0 earlier on Saturday evening.

Having lost narrowly at Malaga a week ago, Ernesto Valverde's men got their season up and running in some style at San Mames.

Aritz Aduriz got the opener 32 minutes in and Ander Iturraspe erased the prospect of any late nerves with a second after the break.

It was party time after that and Iker Muniain added a third 13 minutes from the end.

Primera Division new boys Cordoba enjoyed a happy homecoming back in the top flight, coming from behind to salvage a 1-1 draw at home to Celta Vigo.

Fabian Orellana gave Eduardo Berrizo's side the lead early in the second half with a fortuitous goal that owed a lot to a lapse in concentration by Cordoba goalkeeper Juan Carlos, but Fede Cartabia saved his team-mate's blushes by thumping in an equaliser seven minutes later.

That gave the Andalusian side their first point of the season following last week's 2-0 defeat at Real Madrid.