BARCELONA, Spain (AP) -- Atletico Madrid rallied for a thrilling 1-1 tie at Barcelona on Saturday to secure its first Spanish league title in 18 years.
Atletico lost Diego Costa and Arda Turan to injury in the first 22 minutes, and Barcelona seized control at the Camp Nou in the 34th minute on Alexis Sanchez's goal.
But Atletico got the tie it needed when Diego Godin headed home a corner in the 49th minute just after Atletico had found the post.
Atletico needed to avoid defeat to secure the title, and it weathered Barcelona's pressure over a frantic finish to cap an improbable championship.
Atletico's 10th title meant a club other than Barcelona or Real Madrid was Spanish champion for the first time since Valencia in 2004.
Even the 90,000-strong Camp Nou crowd appeared to appreciate the feat, raining cheers of ''Atleti'' down on the players as they celebrated a victory that looked uncertain after it lost two of its best attacking players.
But Godin's header off Koke's corner allowed Atletico to finish the 38-game season with 90 points. Barcelona finished second with 87, the same as Real Madrid after it closed the season with a 3-1 win over Espanyol.
''We fought all season long, hanging on against difficult teams and against Real Madrid and Barcelona,'' Godin said. ''We felt the pressure. A lot of things were going against us.''
It was only the third time the championship had been decided by two teams facing each other on the final day, and the first time since 1951. Atletico did it in 1946.
Atletico contained Lionel Messi for the sixth time this season, as the Argentina forward had a second-half goal ruled offside to keep him off the scoreboard.
Not since Espanyol in 1939-40 has a club gone unbeaten in six games in a season against Barcelona, with five of those matches ties and Atletico's lone victory knocking Barcelona out of the Champions League.
Barcelona finishes the season without a major trophy for the first time since 2008.
Madrid will be Atletico's next challenge, as the city rivals face off in the Champions League final May 24.