Under pressure and needing a victory, Barcelona didn’t mind leaving aside its ball-possession game for a while.

It was with set pieces that the team salvaged a crucial win this weekend to get back on track after a turbulent start to the year under coach Quique Setién.

Lionel Messi had three assists — two from free kicks — as Barcelona twice came from behind to defeat Real Betis 3-2 in Seville on Sunday. The victory kept the Catalan club three points behind Spanish league leader Real Madrid, which earlier had won 4-1 at Osasuna.

Barcelona's Clement Lenglet, left, is congratulated by teammates after scoring during La Liga soccer match between Betis and Barcelona at the Benito Villamarin stadium in Seville, Spain, Sunday, Feb. 9, 2020. (AP PhotoMiguel Morenatti)

Barcelona's Clement Lenglet, left, is congratulated by teammates after scoring during La Liga soccer match between Betis and Barcelona at the Benito Villamarin stadium in Seville, Spain, Sunday, Feb. 9, 2020. (AP PhotoMiguel Morenatti)

Barcelona didn’t fully abandon its traditional passing game, but it only got the goals it needed at Benito Villamarín Stadium thanks to the set pieces. The team was losing 2-1 when Messi found Sergio Busquets inside the area for the equalizer just before halftime, and after the break it was a header from Clement Lenglet off another cross from Messi that gave Barcelona the win.

“What hurts the most is that their team can score a thousand different ways but we conceded two goals from free kicks far from the area,” Real Betis coach Rubi said.

Barcelona continued to improve despite the narrow victory, relieving some of the pressure over Setién since he replaced Ernesto Valverde at the beginning of the year.

Barcelona's Clement Lenglet celebrates after scoring during La Liga soccer match between Betis and Barcelona at the Benito Villamarin stadium in Seville, Spain, Sunday, Feb. 9, 2020. (AP PhotoMiguel Morenatti)

Barcelona's Clement Lenglet celebrates after scoring during La Liga soccer match between Betis and Barcelona at the Benito Villamarin stadium in Seville, Spain, Sunday, Feb. 9, 2020. (AP PhotoMiguel Morenatti)

“We've played more games and had more time to practice under him,” Barcelona midfielder Sergi Roberto said. “After a change, you always need some time to adapt, but it's a lot easier to work after victories.”

Next for Barcelona will be a league game at home against third-place Getafe, which has been playing some of the best soccer in Spain recently.

GETAFE’S RUN

Barcelona's head coach Quique Setien sits on the bench during La Liga soccer match between Betis and Barcelona at the Benito Villamarin stadium in Seville, Spain, Sunday, Feb. 9, 2020. (AP PhotoMiguel Morenatti)

Barcelona's head coach Quique Setien sits on the bench during La Liga soccer match between Betis and Barcelona at the Benito Villamarin stadium in Seville, Spain, Sunday, Feb. 9, 2020. (AP PhotoMiguel Morenatti)

Getafe again has become the sensation of the Spanish league.

For the second straight season, the modest club from southern Madrid is hanging around near the top of the standings, contending for a Champions League spot and outplaying some more traditional Spanish teams.

Getafe is in third place after 23 matches, ahead of Atlético Madrid, Sevilla and Valencia. It trails second-place Barcelona by seven points and Real Madrid by 10.

“It’s a tough team to beat,” Valencia coach Albert Celades said. “It plays very solidly on defense and it doesn’t concede many goals. When a team is in third place like that, it’s because it does a lot of things well, there is no doubt about that.”

Valencia was Getafe’s latest victim on Saturday, routed 3-0. In the previous round, Getafe had won 2-0 at Athletic Bilbao.

Getafe was in contention for a Champions League spot until the end of last season, holding on to fourth place until being overcome by Valencia with two rounds to go. It will face Ajax in the round of 32 of this season's Europa League.

EFFECTIVE STRIKERS

Real Sociedad’s Alexander Isak and Espanyol’s Raúl de Tomás have been among the hottest strikers in Europe.

Isak has scored eight goals in his last six games, including one in Sociedad’s 2-1 win over Athletic Bilbao in the Basque Country derby in the Spanish league on Sunday. A few days earlier he had scored twice in the team’s stunning 4-3 win at Real Madrid in the quarterfinals of the Copa del Rey.

The 20-year-old Isak, who already plays for Sweden’s national team, joined Sociedad from Borussia Dortmund last year.

De Tomás, Espanyol's most expensive transfer after joining from Benfica in January, has scored in each of his first five matches with the Barcelona club. His latest goal was a 58th-minute winner against Granada on Sunday, giving his team its first home victory in the Spanish league this season.

He was signed for a reported 20 million euros ($21.9 million) plus add-ons, surpassing the nearly 10 million euros ($10.9 million) the Spanish club had paid for Matías Vargas last year.

The 25-year-old de Tomás has a contract with Espanyol until 2026. He used to play in the youth squads of Real Madrid before joining second-division club Rayo Vallecano on a loan. He was eventually sold to Benfica for 20 million euros ($21.9 million).

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

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