BARCELONA, Spain — After Ansu Fati went down injured and Antoine Griezmann sunk deeper into his scoring rut, Barcelona called on Lionel Messi to save it from another setback.

Messi was up to the task.

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

The much-needed win came at a high cost, though, with Barcelona’s rising star Fati leaving the field at halftime with a torn meniscus in his left knee.

Barcelona coach Ronald Koeman said that he gave Messi some rare rest during the first half after his star player felt he needed more time to recover from Wednesday’s 2-1 win over Dynamo Kyiv in the Champions League. It was Messi’s first league game as a substitute in more than a year.

“If he had been completely fine, he would have played (from the start),” Koeman said. “We decided to leave him on the bench in case we needed him. ... In the second half he was very important.”

While Messi got Barcelona back on track, João Félix’s latest double helped Atlético Madrid rise to the top of the league with a convincing 4-0 rout of Cádiz.

Barcelona is in eighth place, six points behind Diego Simeone’s side, with a game in hand.

FATI HURT

Fati appeared to be hurt after a challenge from Aissa Mandi in the penalty area. Griezmann took the resulting spot kick, only for Claudio Bravo to save it.

Koeman sent on Messi for Fati at halftime after the 18-year-old forward had complained about pain in his knee. The club later released a brief medical report on Fati, who has set several precocious scoring records since earning a place on the senior team last season. He became Spain’s youngest scorer in September.

The club said that the “treatment to be followed will be determined in the coming days.”

GOALS GALORE

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

Betis forward Antonio Sanabria equalized in the final seconds of the first half that featured four clear misses by Griezmann.

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.

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.

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 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.

Betis coach Manuel Pellegrini complained about the use of VAR, which advised the referee that he had not seen the handball by Mandi.

“I don’t know if the referee or VAR is refereeing. We can’t have two referees,” Pellegrini said.

Lorenzo Morón got one back for Betis in the 73rd. 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.

UNBEATEN ATLÉTICO

Marcos Llorente, who could make his debut for Spain after being called up for the first time, set up Félix for the opener before making it 2-0 with a goal of his own in the 22nd.

It was then Félix’s turn to pass for Luis Suárez to add to the lead over Cádiz.

Felix headed in a final goal in the 90th.

Félix has scored a brace in three of his last four matches. The 20-year-old Portugal forward has seven goals in the season.

“We are on a good run,” Llorente said. “We have taken a step forward and we have shown on the field we are a good team and the results are going our way.”

Atlético is the only team yet to lose in the league.

SEVILLA STOPS SLIDE

Lucas Ocampos converted a retaken penalty kick to give Sevilla a 1-0 win over Osasuna.

Sevilla had lost three league games in a row.

After being fouled in the area, Ocampos’ first spot kick was saved by Sergio Herrera. But Ocampos got another chance after Herrera was penalized for having left his line too early.

“We needed to get this win any way we could,” Ocampos said.

Also, Rafa Mir scored to give Huesca a 1-1 draw with Eibar, which had gone ahead on a goal by Esteban Burgos.

___

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