Real Betis have completed the signing of William Carvalho from Sporting Lisbon on a five-year deal.
However, the 26-year-old has now put pen to paper on a long-term contract at Betis which will keep him at the club until 2023.
The deal is understood to have cost around €40m (£35m) in total, with Carvalho ending his 13-year stay in Lisbon having joined as a youth player in 2005.
Carvalho was one of a number of players who considered cancelling their contract with Sporting after fans stormed their training pitch and attacked players due to their failure to qualify for the Champions League.
The 47-time Portugal international was part of his country's squad for this summer's World Cup in Russia.