( CNN ) -- Barcelona clinched a third successive Spanish league title with two matches to spare despite being held 1-1 at Levante on Wednesday . Pep Guardiola 's team went into the match needing a just a point after second-placed arch-rivals Real Madrid kept the race alive with a 4-0 win against Getafe on Tuesday . With head-to-head records taken into account , Barca can not be caught after beating Real 5-0 in November and drawing the second Clasico clash 1-1 last month . `` Winning the title is always difficult and this one was tough just like the others were before . Now we can enjoy this win , '' coach Guardiola said in quotes reported by AFP . Ronaldo hat-trick keeps faint Real Madrid hopes alive . `` We were fantastic for the first three quarters of the league and in the final quarter the goals dried up . If we have dropped our standards at the end of the season it is simply because the team has barely stopped for the past two seasons . `` It was difficult coming off the back of the World Cup . Nine Barcelona players won the World Cup ( with Spain ) and I did n't know how they were going to react . The attitude of all the players has been fantastic and the title is for them . '' The Champions League finalists looked to be cruising to a 30th victory in 36 La Liga outings when Seydou Keita headed Barca in front after 28 minutes . The Ivory Coast midfielder stole in unmarked to nod home a lofted through-ball from influential midfielder Xavi to score his sixth goal this season . But Felipe Caicedo pounced on a defensive error to equalize four minutes before halftime , slotting into the empty net after Gerard Pique missed his attempted clearance to leave goalkeeper Victor Valdes stranded . Lionel Messi almost netted his 32nd league goal this season in the 58th minute after a trademark solo run saw him squeeze past four players , but the two-time world player of the year 's low shot rebounded to safety off the inside of the post . `` It 's always a nice feeling to win the title and the fans really deserve this , '' Xavi said . `` I imagine we 're going to celebrate this title win with them tonight in the streets of Barcelona . '' The draw was enough to seal Barcelona 's 21st Spanish title , 10 behind Real 's all-time record , but it means the club can not reach 100 points this season -- having 92 now . The Catalan side 's achievement was founded on a superb first half of the season , with 17 wins and a draw despite a shock second-round defeat by promoted Hercules . Barca went 31 games undefeated , one short of Real Sociedad 's record , with 16 successive victories from round seven . While Messi has grabbed the headlines with 52 goals in all competitions , Barca 's all-attacking style has seen 22 players hit the net in a total of 92 scored -- with only 20 conceded . Valencia failed to clinch third place and an automatic Champions League spot after drawing 2-2 at Espanyol , but have a five-point lead over Villarreal . Villarreal will also be in Europe 's top club competition next season but may have to play in the final qualifying round , having sealed fourth place with a 0-0 draw at relegated Almeria . Sevilla had the chance to move up to fifth and into the leading Europa League position by winning at Osasuna in the late match , but crashed to a 3-2 defeat and stayed two points behind Athletic Bilbao . Striker Alvaro Negredo headed two goals in three first-half minutes for Sevilla before Kike Sola equalized with a double of his own , the second coming in the 87th minute . Substitute Dejan Lekic then scored the winner two minutes later to lift Osasuna five points clear of the danger zone , while Sevilla had midfielder Gary Medel sent off for a second booking . Second-bottom Hercules will return to the Segunda Division after a 1-1 draw with Mallorca , who came from two goals down to move four points clear of Zaragoza in the final relegation place . Real Zaragoza lost 2-1 at Real Sociedad , whose captain Mikel Aranburu scored an 88th-minute winner to lift his club into 12th place .
Barcelona 's 1-1 draw at Levante clinches the club 's 21st La Liga title . Pep Guardiola wins his third successive crown as coach with two games to play . Second-placed Real Madrid trail by six points but have inferior head-to-head record . Valencia fail to clinch third place and automatic Champions League spot after draw .