BARCELONA, Spain (AP) -- Lionel Messi set up Frenkie de Jong for a goal to help earn a 1-0 win at Huesca on Sunday in the Argentine great's 750th overall appearance for Barcelona and his 500th in the Spanish league.
The 33-year-old Messi trails only Xavi Hernandez as the Barcelona player with the most games played. Xavi played 767 games in all competitions, including 505 la Liga matches.
Messi's latest milestone came less than two weeks after he surpassed Pele's all-time club scoring record for Santos by netting his 644th goal for Barcelona.
Barcelona dominated last-place Huesca but could only manage De Jong's goal in the 27th minute. Messi lobbed a pass forward to meet De Jong's run behind the defense, with the Netherlands midfielder steering the ball inside the upright.
Huesca goalkeeper Alvaro Fernandez saved Messi's two chances, preventing him from adding to his league record of 451 goals. He blocked a free kick just before halftime and smothered shot from close range in the 68th.
Barcelona's win came after Messi sat out a 1-1 draw with Eibar last round to recover from an ankle problem.
The victory moved Barcelona ahead of Sevilla into fifth place.
Ronald Koeman's team is 10 points behind leader Atletico Madrid, which got a late goal from Luis Suarez to win 2-1 at Alaves.
Atletico was moments from enduring a setback against an Alaves that played with 10 men for almost half an hour.
That was when Suarez came through with the 90th-minute winner. The former Barcelona striker scored from close range completing a cross by Joao Felix shortly after Atletico had conceded an equalizer.
Suarez also helped Atletico take the lead with a 41st-minute assist to Marcos Llorente, who cleared three defenders outside the area before firing a low shot that deflected off a defender before finding the net.
Alaves lost defender Victor Laguardia with a straight red card determined by video review for a hard foul on Thomas Lemar. The hosts equalized in the 84th when Atletico defender Felipe found his own net while trying to clear a cross inside the area.
The win gave Atletico a two-point lead over second-place Real Madrid, which defeated Celta Vigo 2-0 at home on Saturday. Atletico has two games in hand on its city rival.
''We had the game in hand, we didn't put it away, then came their goal,'' Atletico coach Diego Simeone said. ''The best part about today's game was how the team handled the final minutes without getting nervous. The goal was a good one, with our No. 9 just where he should be.''
Simeone's team has won 11 of its past 12 league matches, with the only setback a 2-0 loss at Madrid four rounds ago.
Alaves, which stayed in 11th place, has one win in its its past six matches.
BILBAO FIRES COACH
Athletic Bilbao fired coach Gaizka Garitano after it defeated struggling Elche 1-0 at home thanks to a goal by Iker Muniain.
The club then announced it had reached an agreement in principle to hire Marcelino Garcia Toral as Garitano's replacement.
Third-place Real Sociedad was held 1-1 at home by Osasuna, leaving it eight points behind Atletico.
More AP soccer: https://apnews.com/Soccer and https://twitter.com/AP-Sports