Lionel Messi scored two screamers in his record-equaling 505th Spanish league appearance for Barcelona to help them stay in touch with leader Atlético Madrid on Saturday.

Messi struck twice from well outside the area as Alavés was beaten 5-1. Messi matched former teammate Xavi Hernández’s club record for the most league appearances by starting the match at Camp Nou.

More Images
Barcelona's Lionel Messi celebrates after scoring his side's second goal during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Lionel Messi scored two screamers in his record-equaling 505th Spanish league appearance for Barcelona to help them stay in touch with leader Atlético Madrid on Saturday.

Barcelona's Lionel Messi celebrates after scoring his side's second goal during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Atlético got goals from Marcos Llorente and Ángel Correa to win at Granada 2-1 and bounce back from a draw against Celta Vigo in the last round, which ended a winning run of eight consecutive rounds.

Barcelona's Lionel Messi scores his side's second goal during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Barcelona's Lionel Messi scores his side's second goal during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Barcelona's Francisco Trincao, centre right, kicks the ball to score his side's first goal during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Barcelona's Francisco Trincao, centre right, kicks the ball to score his side's first goal during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Barcelona's Lionel Messi, centre, runs with the ball surrounded of Alaves players during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Barcelona's Lionel Messi, centre, runs with the ball surrounded of Alaves players during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Alaves' Tomas Pina, left heads for the ball with Barcelona's Moriba Kourouma during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Alaves' Tomas Pina, left heads for the ball with Barcelona's Moriba Kourouma during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Barcelona's Lionel Messi, right, vies for the ball with Alaves' goalkeeper Fernando Pacheco during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Barcelona's Lionel Messi, right, vies for the ball with Alaves' goalkeeper Fernando Pacheco during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Forward Francisco Trincão also scored twice in Barcelona’s win before it hosts Paris Saint-Germain in their highly anticipated Champions League clash on Tuesday.

Barcelona's Lionel Messi celebrates after scoring his side's second goal during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Barcelona's Lionel Messi celebrates after scoring his side's second goal during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Atlético got goals from Marcos Llorente and Ángel Correa to win at Granada 2-1 and bounce back from a draw against Celta Vigo in the last round, which ended a winning run of eight consecutive rounds.

Diego Simeone’s side, which has lost only once in 21 rounds, is eight points clear of Barcelona and titleholder Real Madrid.

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

Barcelona's Lionel Messi celebrates after scoring his side's second goal during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Barcelona's Lionel Messi celebrates after scoring his side's second goal during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Barcelona's Lionel Messi scores his side's second goal during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Barcelona's Lionel Messi scores his side's second goal during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Barcelona's Francisco Trincao, centre right, kicks the ball to score his side's first goal during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Barcelona's Francisco Trincao, centre right, kicks the ball to score his side's first goal during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Barcelona's Lionel Messi, centre, runs with the ball surrounded of Alaves players during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Barcelona's Lionel Messi, centre, runs with the ball surrounded of Alaves players during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Alaves' Tomas Pina, left heads for the ball with Barcelona's Moriba Kourouma during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Alaves' Tomas Pina, left heads for the ball with Barcelona's Moriba Kourouma during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Barcelona's Lionel Messi, right, vies for the ball with Alaves' goalkeeper Fernando Pacheco during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)

Barcelona's Lionel Messi, right, vies for the ball with Alaves' goalkeeper Fernando Pacheco during the Spanish La Liga soccer match between FC Barcelona and Alaves at the Camp Nou stadium in Barcelona, Spain, Saturday, Feb. 13, 2021. (AP PhotoJoan Monfort)