Adjust font size:
MADRID, Spain -- Jose Antonio Reyes came on as a 66th minute substitute for injured David Beckham and scored twice as Real Madrid beat Real Mallorca 3-1 to lift their 30th Primera Liga title.
Real were trailing 1-0 when Beckham had to go off and his replacement Reyes equalized within a minute. After Mahamadou Diarra sent Madrid in front with 10 minutes left, Reyes struck again three minutes later.
It had been an anxious evening for Madrid after they fell behind to a 17th minute goal by Fernando Varela because their rivals for the title, Barcelona, were storming to a 5-1 win at Gimnastic Tarragona.
Madrid had to stay level on points with last year's champions, knowing that their superior head-to-head record would give them the title.
Beckham watched nervously as Madrid rallied for the win before pointing up to his wife Victoria and friends Tom Cruise and Katie Holmes, who were sitting in the stands.
Madrid ended their longest major trophy drought in 53 years with a lap of honor before throwing coach Fabio Capello into the air as the Italian won his second title as coach at Madrid. The other was in 1997.
Barcelona had made valiant efforts to pull off a third straight league title.
Lionel Messi scored two goals and set up Carles Puyol for another at Tarragona.
Ronaldinho curled in a free kick for his 21st goal of the season before Gianluca Zambrotta scored in injury time as Barcelona finished without a trophy for the first time in three seasons.
Third placed Sevilla, the UEFA Cup champions, ended the season with a 1-0 home defeat against Villarreal, Fabricio Fuentes scoring the decider after 50 minutes to earn his side a UEFA Cup spot next season.
Athletic Bilbao, one of three teams never to have been relegated from the top division, preserved their senior status by ending the season with a 2-0 home win over Levante, thanks to an own goal by Jose Manuel Serrano and a header from Igor Gabilondo.
Bilbao's Basque neighbors Real Sociedad were not so fortunate, dropping out of the top flight for the first time in 40 years, along with Celta Vigo.
Levante defender Jose Manuel Serrano's 60th minute blunder, followed 17 minutes later by Gabilondo's header, were enough to guarantee Bilbao's survival.
Edu Schmidt scored two goals in the last 10 minutes as Real Betis maintained their place in the first division with a 2-0 win at Racing Santander.
Sociedad dropped into the second division after drawing 3-3 at Valencia, while Celta Vigo went down despite rallying for a 2-1 win over Getafe.