Porto say they have exercised the option to sign Jakub Kiwior on a permanent deal.
The Poland international will move for an initial fee of 17m euros (£14.7m) with a possible 5m euros in add-ons.
Arsenal will also have a 2m euro sell-on clause in any future transfer.
Kiwior joined the Portuguese club on a season-long loan deal on deadline day and the move contained an option for Porto to make the move permanent.
Arsenal signed the 26-year-old centre-back from Italian side Spezia in January 2023 for £17.3m.
He made 68 appearances for the Gunners.