BARCELONA, Spain (AP)Netherlands striker Memphis Depay will join Atletico Madrid from Spanish league rival Barcelona after the Catalan club said Friday it had reached a deal to sell the player.

Depay had already trained with Atletico on Thursday with permission from Barcelona.

Barcelona said Atletico had agreed to pay 3 million euros ($3.25 million) with a possible 1 million euros ($1.08 million) more in add-ons. Depay agreed to a contract that will keep him in the capital for next two-and-a-half years, Atletico said.

As part of the deal, Barcelona also secured an option to buy Atletico winger Yannick Carrasco in the future.

Depay helped the Dutch national team reach the World Cup quarterfinals in December before losing to eventual champion Argentina.

He will now be tasked to team up with Antoine Griezmann and fill the void left at Atletico after Joao Felix was loaned to Chelsea last week.

The 28-year-old Depay joined Barcelona in 2021 from Lyon at the request of then coach Ronald Koeman. He was a regular starter under his fellow countryman, but became a backup after Xavi replaced Koeman midway through last season. His minutes dwindled even further after the arrivals of Robert Lewandowski and Raphinha last summer.

Far behind Spanish leader Barcelona, Atletico is fighting to secure a top-four finish and a resulting Champions League berth. Its only realistic shot at a title this campaign is in the Copa del Rey, where it will face Real Madrid in the quarterfinals next week.

Barcelona also benefits from the deal by lowering its burdensome payroll as it tries to pay down its debt.

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