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 Hernández as the Barcelona player with the most games played. Xavi played 767 games in all competitions, including 505 la Liga matches.

More Images
Barcelona's Frenkie de Jong celebrates after scoring his side's first goal during the Spanish La Liga soccer match between Huesca and FC Barcelona at El Alcoraz stadium in Huesca, Spain, Sunday, Jan. 3, 2021. (AP PhotoAlvaro Barrientos)

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.

Barcelona's Lionel Messi, center, in action during the Spanish La Liga soccer match between Huesca and FC Barcelona at El Alcoraz stadium in Huesca, Spain, Sunday, Jan. 3, 2021. (AP PhotoAlvaro Barrientos)

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.

Barcelona's Frenkie de Jong, second left, celebrates after scoring his side's first goal during the Spanish La Liga soccer match between Huesca and FC Barcelona at El Alcoraz stadium in Huesca, Spain, Sunday, Jan. 3, 2021. (AP PhotoAlvaro Barrientos)

The victory moved Barcelona ahead of Sevilla into fifth place.

Barcelona's goalkeeper Marc-Andre ter Stegen, center left, clears the ball during the Spanish La Liga soccer match between Huesca and FC Barcelona at El Alcoraz stadium in Huesca, Spain, Sunday, Jan. 3, 2021. (AP PhotoAlvaro Barrientos)

Atlético was moments from enduring a setback against an Alavés that played with 10 men for almost half an hour.

Barcelona's Ousmane Dembele kicks the ball during the Spanish La Liga soccer match between Huesca and FC Barcelona at El Alcoraz stadium in Huesca, Spain, Sunday, Jan. 3, 2021. (AP PhotoAlvaro Barrientos)

Alavés 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 Atlético defender Felipe found his own net while trying to clear a cross inside the area.

Huesca's Shinji Okazaki, left, vies for the ball with Barcelona's Clement Lenglet during the Spanish La Liga soccer match between Huesca and FC Barcelona at El Alcoraz stadium in Huesca, Spain, Sunday, Jan. 3, 2021. (AP PhotoAlvaro Barrientos)

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.

Messi’s latest milestone came less than two weeks after he surpassed Pelé’s all-time club scoring record for Santos by netting his 644th goal for Barcelona.

Barcelona's Frenkie de Jong celebrates after scoring his side's first goal during the Spanish La Liga soccer match between Huesca and FC Barcelona at El Alcoraz stadium in Huesca, Spain, Sunday, Jan. 3, 2021. (AP PhotoAlvaro Barrientos)

Barcelona's Frenkie de Jong celebrates after scoring his side's first goal during the Spanish La Liga soccer match between Huesca and FC Barcelona at El Alcoraz stadium in Huesca, Spain, Sunday, Jan. 3, 2021. (AP PhotoAlvaro Barrientos)

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 Álvaro Fernández 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.

Barcelona's Lionel Messi, center, in action during the Spanish La Liga soccer match between Huesca and FC Barcelona at El Alcoraz stadium in Huesca, Spain, Sunday, Jan. 3, 2021. (AP PhotoAlvaro Barrientos)

Barcelona's Lionel Messi, center, in action during the Spanish La Liga soccer match between Huesca and FC Barcelona at El Alcoraz stadium in Huesca, Spain, Sunday, Jan. 3, 2021. (AP PhotoAlvaro Barrientos)

The victory moved Barcelona ahead of Sevilla into fifth place.

Ronald Koeman’s team is 10 points behind leader Atlético Madrid, which got a late goal from Luis Suárez to win 2-1 at Alavés.

SUÁREZ CLUTCH

Barcelona's Frenkie de Jong, second left, celebrates after scoring his side's first goal during the Spanish La Liga soccer match between Huesca and FC Barcelona at El Alcoraz stadium in Huesca, Spain, Sunday, Jan. 3, 2021. (AP PhotoAlvaro Barrientos)

Barcelona's Frenkie de Jong, second left, celebrates after scoring his side's first goal during the Spanish La Liga soccer match between Huesca and FC Barcelona at El Alcoraz stadium in Huesca, Spain, Sunday, Jan. 3, 2021. (AP PhotoAlvaro Barrientos)

Atlético was moments from enduring a setback against an Alavés that played with 10 men for almost half an hour.

That was when Suárez came through with the 90th-minute winner. The former Barcelona striker scored from close range completing a cross by João Félix shortly after Atlético had conceded an equalizer.

Suárez also helped Atlético 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.

Barcelona's goalkeeper Marc-Andre ter Stegen, center left, clears the ball during the Spanish La Liga soccer match between Huesca and FC Barcelona at El Alcoraz stadium in Huesca, Spain, Sunday, Jan. 3, 2021. (AP PhotoAlvaro Barrientos)

Barcelona's goalkeeper Marc-Andre ter Stegen, center left, clears the ball during the Spanish La Liga soccer match between Huesca and FC Barcelona at El Alcoraz stadium in Huesca, Spain, Sunday, Jan. 3, 2021. (AP PhotoAlvaro Barrientos)

Alavés 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 Atlético defender Felipe found his own net while trying to clear a cross inside the area.

The win gave Atlético a two-point lead over second-place Real Madrid, which defeated Celta Vigo 2-0 at home on Saturday. Atlético 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," Atlético 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.”

Barcelona's Ousmane Dembele kicks the ball during the Spanish La Liga soccer match between Huesca and FC Barcelona at El Alcoraz stadium in Huesca, Spain, Sunday, Jan. 3, 2021. (AP PhotoAlvaro Barrientos)

Barcelona's Ousmane Dembele kicks the ball during the Spanish La Liga soccer match between Huesca and FC Barcelona at El Alcoraz stadium in Huesca, Spain, Sunday, Jan. 3, 2021. (AP PhotoAlvaro Barrientos)

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.

Alavés, which stayed in 11th place, has one win in its its past six matches.

BILBAO FIRES COACH

Huesca's Shinji Okazaki, left, vies for the ball with Barcelona's Clement Lenglet during the Spanish La Liga soccer match between Huesca and FC Barcelona at El Alcoraz stadium in Huesca, Spain, Sunday, Jan. 3, 2021. (AP PhotoAlvaro Barrientos)

Huesca's Shinji Okazaki, left, vies for the ball with Barcelona's Clement Lenglet during the Spanish La Liga soccer match between Huesca and FC Barcelona at El Alcoraz stadium in Huesca, Spain, Sunday, Jan. 3, 2021. (AP PhotoAlvaro Barrientos)

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 García Toral as Garitano's replacement.

SOCIEDAD SLIP

Third-place Real Sociedad was held 1-1 at home by Osasuna, leaving it eight points behind Atlético.

More AP soccer: https://apnews.com/Soccer and https://twitter.com/AP_Sports