Lionel Messi came off the bench at halftime to score two goals as Barcelona beat 10-man Real Betis 5-2 on Saturday to end its four-game winless streak in the Spanish league.

Barcelona coach Ronald Koeman gave Messi some rare rest during the first half. It was Messi’s first league game as a substitute in more than a year. Assistant coach Alfred Schreuder said before kickoff that Messi “was not fresh.”

More Images
Barcelona's Lionel Messi, second right, is challenged by Betis' Guido Rodriguez, left, during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)

Lionel Messi came off the bench at halftime to score two goals as Barcelona beat 10-man Real Betis 5-2 on Saturday to end its four-game winless streak in the Spanish league.

Barcelona's Lionel Messi, right, is fouled by Betis' Alex Moreno during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)

Betis forward Antonio Sanabria equalized in the final seconds of the first half that featured four clear misses by Barcelona’s struggling forward Antoine Griezmann, including a penalty blocked by Bravo.

Barcelona's Lionel Messi, left, scores his side's third goal from the penalty spot during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)

Messi continued to show his playmaking skills. Deep inside Betis’ area, Messi turned and fed a pass to Dembele, whose shot was goal-bound when defender Aissa Mandi blocked it with his arm. A video review led to Mandi being shown a red card for impeding a clear goal.

Barcelona's Lionel Messi, right, is fouled by Betis' Alex Moreno during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)

But Messi put the result beyond doubt when Sergi Roberto set him up with a fine back-heeled pass for the Argentina forward to get his sixth goal in all competitions this season.

Barcelona's Antoine Griezmann reacts after a missed scoring opportunity during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)

Barcelona's Antoine Griezmann reacts after a missed scoring opportunity during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)

Barcelona's Ansu Fati gestures during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)

Barcelona's Ansu Fati gestures during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)

Barcelona's Lionel Messi, right, sits on the bench as Barcelona's head coach Ronald Koeman stands on the side line during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)

Barcelona's Lionel Messi, right, sits on the bench as Barcelona's head coach Ronald Koeman stands on the side line during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)

Ousmane Dembele blasted a shot past former Barcelona goalkeeper Claudio Bravo to give the hosts the lead in the 22nd minute.

Barcelona's Lionel Messi, second right, is challenged by Betis' Guido Rodriguez, left, during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)

Barcelona's Lionel Messi, second right, is challenged by Betis' Guido Rodriguez, left, during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)

Betis forward Antonio Sanabria equalized in the final seconds of the first half that featured four clear misses by Barcelona’s struggling forward Antoine Griezmann, including a penalty blocked by Bravo.

Messi spent the first half tucked in a winter coat and wearing a face mask like other substitutes in the otherwise empty Camp Nou. That all changed when Messi went on at the start of the second half for Ansu Fati and had a decisive impact.

Messi only needed four minutes to impact the match when he smartly skipped over a pass to let it run though for Griezmann to tap home.

Barcelona's Lionel Messi, right, is fouled by Betis' Alex Moreno during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)

Barcelona's Lionel Messi, right, is fouled by Betis' Alex Moreno during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)

Messi continued to show his playmaking skills. Deep inside Betis’ area, Messi turned and fed a pass to Dembele, whose shot was goal-bound when defender Aissa Mandi blocked it with his arm. A video review led to Mandi being shown a red card for impeding a clear goal.

Messi stepped up and causally blasted his spot kick into the top right corner to make it 3-1 in the 61st.

Lorenzo Morón got one back for Betis in the 73rd after Barcelona’s defense struggled to mark winger Álex Moreno.

Barcelona's Lionel Messi, left, scores his side's third goal from the penalty spot during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)

Barcelona's Lionel Messi, left, scores his side's third goal from the penalty spot during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)

But Messi put the result beyond doubt when Sergi Roberto set him up with a fine back-heeled pass for the Argentina forward to get his sixth goal in all competitions this season.

Roberto also assisted Pedro “Pedri” González in the 90th as the 17-old-year midfielder claimed his first league goal.

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

Barcelona's Lionel Messi, right, is fouled by Betis' Alex Moreno during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)

Barcelona's Lionel Messi, right, is fouled by Betis' Alex Moreno during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)

Barcelona's Antoine Griezmann reacts after a missed scoring opportunity during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)

Barcelona's Antoine Griezmann reacts after a missed scoring opportunity during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)

Barcelona's Ansu Fati gestures during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)

Barcelona's Ansu Fati gestures during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)

Barcelona's Lionel Messi, right, sits on the bench as Barcelona's head coach Ronald Koeman stands on the side line during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)

Barcelona's Lionel Messi, right, sits on the bench as Barcelona's head coach Ronald Koeman stands on the side line during the Spanish La Liga soccer match between FC Barcelona and Betis at the Camp Nou stadium in Barcelona, Spain, Saturday, Nov. 7, 2020. (AP PhotoJoan Monfort)