Lionel Messi scored twice as he tied Xavi Hernández's record of most appearances for Barcelona on Monday, putting his team within four points of the Spanish league lead after beating last-placed Huesca 4-1.

For his 767th match, Messi was honored by Barcelona with a large image behind one of the goals showing him embracing Xavi. The banner included the words “touching the sky.”

More Images
Barcelona's Lionel Messi, right, celebrates after scoring his side's first goal with teammates during the Spanish La Liga soccer match between FC Barcelona and Huesca at the Camp Nou stadium in Barcelona, Spain, Monday, March 15, 2021. (AP PhotoJoan Monfort)

Lionel Messi scored twice as he tied Xavi Hernández's record of most appearances for Barcelona on Monday, putting his team within four points of the Spanish league lead after beating last-placed Huesca 4-1.

Barcelona's Antoine Griezmann, left, scores his side's second goal during the Spanish La Liga soccer match between FC Barcelona and Huesca at the Camp Nou stadium in Barcelona, Spain, Monday, March 15, 2021. (AP PhotoJoan Monfort)

Atlético, seeking its first league title since 2014, had a comfortable lead until recently, having won only two of its last six league games. It was held to 0-0 at Getafe on Saturday.

Barcelona's Antoine Griezmann, center left, celebrates after scoring his side's second goal during the Spanish La Liga soccer match between FC Barcelona and Huesca at the Camp Nou stadium in Barcelona, Spain, Monday, March 15, 2021. (AP PhotoJoan Monfort)

Messi scored in each half for his 130th double in the league. He opened the scoring with a shot into the top corner after a nifty one-touch to clear a defender just outside the area in the 13th minute, then closed the scoring with another shot from outside the area in the 90th.

Barcelona's Lionel Messi, second right, vies for the ball surrounded of Huesca players during the Spanish La Liga soccer match between FC Barcelona and Huesca at the Camp Nou stadium in Barcelona, Spain, Monday, March 15, 2021. (AP PhotoJoan Monfort)

Huesca pulled one back through a penalty kick earned after a breakaway in first-half stoppage time, converted by forward Rafa Mir.

Barcelona's Antoine Griezmann celebrates after scoring his side's second goal with teammates during the Spanish La Liga soccer match between FC Barcelona and Huesca at the Camp Nou stadium in Barcelona, Spain, Monday, March 15, 2021. (AP PhotoJoan Monfort)

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

Barcelona's Oscar Mingueza, center left, celebrates after scoring his side's third goal during the Spanish La Liga soccer match between FC Barcelona and Huesca at the Camp Nou stadium in Barcelona, Spain, Monday, March 15, 2021. (AP PhotoJoan Monfort)

Barcelona's Oscar Mingueza, center left, celebrates after scoring his side's third goal during the Spanish La Liga soccer match between FC Barcelona and Huesca at the Camp Nou stadium in Barcelona, Spain, Monday, March 15, 2021. (AP PhotoJoan Monfort)

Barcelona's head coach Ronald Koeman gives instruction inside the box team area during the Spanish La Liga soccer match between FC Barcelona and Huesca at the Camp Nou stadium in Barcelona, Spain, Monday, March 15, 2021. (AP PhotoJoan Monfort)

Barcelona's head coach Ronald Koeman gives instruction inside the box team area during the Spanish La Liga soccer match between FC Barcelona and Huesca at the Camp Nou stadium in Barcelona, Spain, Monday, March 15, 2021. (AP PhotoJoan Monfort)

Antoine Griezmann and Óscar Mingueza also scored at the Camp Nou Stadium as the Catalan club won its fourth straight league match to increase the pressure on leader Atlético Madrid.

Barcelona's Lionel Messi, right, celebrates after scoring his side's first goal with teammates during the Spanish La Liga soccer match between FC Barcelona and Huesca at the Camp Nou stadium in Barcelona, Spain, Monday, March 15, 2021. (AP PhotoJoan Monfort)

Barcelona's Lionel Messi, right, celebrates after scoring his side's first goal with teammates during the Spanish La Liga soccer match between FC Barcelona and Huesca at the Camp Nou stadium in Barcelona, Spain, Monday, March 15, 2021. (AP PhotoJoan Monfort)

Atlético, seeking its first league title since 2014, had a comfortable lead until recently, having won only two of its last six league games. It was held to 0-0 at Getafe on Saturday.

Diego Simeone's team will visit Barcelona in May.

Barcelona, coming off elimination by Paris Saint-Germain in the Champions League last 16, was in control from the start on Monday.

Barcelona's Antoine Griezmann, left, scores his side's second goal during the Spanish La Liga soccer match between FC Barcelona and Huesca at the Camp Nou stadium in Barcelona, Spain, Monday, March 15, 2021. (AP PhotoJoan Monfort)

Barcelona's Antoine Griezmann, left, scores his side's second goal during the Spanish La Liga soccer match between FC Barcelona and Huesca at the Camp Nou stadium in Barcelona, Spain, Monday, March 15, 2021. (AP PhotoJoan Monfort)

Messi scored in each half for his 130th double in the league. He opened the scoring with a shot into the top corner after a nifty one-touch to clear a defender just outside the area in the 13th minute, then closed the scoring with another shot from outside the area in the 90th.

The Argentine playmaker has 21 league goals, three more than Atlético's Luis Suárez at the top of the scoring list.

Barcelona kept pressing and nearly added to the lead when Jordi Alba hit the crossbar in the 33rd, and a couple of minutes later Griezmann added his goal with a well-struck curling shot into the top corner past Huesca goalkeeper Álvaro Fernández.

Barcelona's Antoine Griezmann, center left, celebrates after scoring his side's second goal during the Spanish La Liga soccer match between FC Barcelona and Huesca at the Camp Nou stadium in Barcelona, Spain, Monday, March 15, 2021. (AP PhotoJoan Monfort)

Barcelona's Antoine Griezmann, center left, celebrates after scoring his side's second goal during the Spanish La Liga soccer match between FC Barcelona and Huesca at the Camp Nou stadium in Barcelona, Spain, Monday, March 15, 2021. (AP PhotoJoan Monfort)

Huesca pulled one back through a penalty kick earned after a breakaway in first-half stoppage time, converted by forward Rafa Mir.

Then Mingueza scored his first goal for Barcelona with a header off a cross by Messi in the 53rd.

Huesca, which has won only one of its last six matches, stayed four points from safety.

Barcelona's Lionel Messi, second right, vies for the ball surrounded of Huesca players during the Spanish La Liga soccer match between FC Barcelona and Huesca at the Camp Nou stadium in Barcelona, Spain, Monday, March 15, 2021. (AP PhotoJoan Monfort)

Barcelona's Lionel Messi, second right, vies for the ball surrounded of Huesca players during the Spanish La Liga soccer match between FC Barcelona and Huesca at the Camp Nou stadium in Barcelona, Spain, Monday, March 15, 2021. (AP PhotoJoan Monfort)

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

Tales Azzoni on Twitter: http://twitter.com/tazzoni

Barcelona's Antoine Griezmann celebrates after scoring his side's second goal with teammates during the Spanish La Liga soccer match between FC Barcelona and Huesca at the Camp Nou stadium in Barcelona, Spain, Monday, March 15, 2021. (AP PhotoJoan Monfort)

Barcelona's Antoine Griezmann celebrates after scoring his side's second goal with teammates during the Spanish La Liga soccer match between FC Barcelona and Huesca at the Camp Nou stadium in Barcelona, Spain, Monday, March 15, 2021. (AP PhotoJoan Monfort)

Barcelona's Oscar Mingueza, center left, celebrates after scoring his side's third goal during the Spanish La Liga soccer match between FC Barcelona and Huesca at the Camp Nou stadium in Barcelona, Spain, Monday, March 15, 2021. (AP PhotoJoan Monfort)

Barcelona's Oscar Mingueza, center left, celebrates after scoring his side's third goal during the Spanish La Liga soccer match between FC Barcelona and Huesca at the Camp Nou stadium in Barcelona, Spain, Monday, March 15, 2021. (AP PhotoJoan Monfort)

Barcelona's head coach Ronald Koeman gives instruction inside the box team area during the Spanish La Liga soccer match between FC Barcelona and Huesca at the Camp Nou stadium in Barcelona, Spain, Monday, March 15, 2021. (AP PhotoJoan Monfort)

Barcelona's head coach Ronald Koeman gives instruction inside the box team area during the Spanish La Liga soccer match between FC Barcelona and Huesca at the Camp Nou stadium in Barcelona, Spain, Monday, March 15, 2021. (AP PhotoJoan Monfort)