Manchester City have signed Benfica defender Ruben Dias for £65m, with Nicolas Otamendi moving in the opposite direction.
The deal for Dias is worth an initial £62m, with a further £3m subject to add-ons, and was confirmed in a statement from Benfica on Sunday night following City's 5-2 defeat at home to Leicester.
In the statement, the Portuguese club said they had agreed a separate fee of 15m euros (£13.6m) to sign Otamendi.
Dias, who becomes City's third signing of the summer following the arrivals of Nathan Ake and Ferran Torres, has signed a six-year deal at the Etihad, where he will wear the No 3 shirt.
- Could Ruben Dias deal decide future of City's Pep Guaridola project?
- Ruben Dias can be Pep Guardiola's leader
- Transfer Centre LIVE!
"To have the opportunity to join a club like Manchester City is a fantastic opportunity for me and one I couldn't turn down," Dias told the club's website.
Save over 25% with a NOW TV Sky Sports Pass
Catch the action for only £25 a month with this limited time offer. Watch the Premier League, Formula 1, PGA Tour and much more. Cancel any time.
"Their success speaks for itself. They have been the dominant team in England over the last few years, playing an attacking brand of football which I feel suits my own game.
"It is really exciting to be part of such a talented squad and to play for a world-class manager like Pep Guardiola, who has a proven track record of developing young players like myself.
"I believe I can improve here, at a club whose ambitions match my own and I will give everything to be successful and win titles."
Guardiola had been seeking a right-sided centre-back since Vincent Kompany left last year.
Dias has impressed during three seasons at Benfica and was in Portugal's 2018 World Cup squad.
The 23-year-old scored and captained the side in Benfica's 2-0 win over Moreirense on Saturday, after which he was pictured hugging the club's sporting director Rui Costa.
City director of football, Txiki Begiristain, added: "Ruben is a player we have admired for some time and we have been impressed with how he has progressed at Benfica.
"He has developed into a real leader and as a defender, he has all the attributes we are looking for. He is strong in the air, good in one v one situations and technically, he is very good, so we are confident he can thrive in our system.
"He is young, but has experience playing for a top European club in Benfica and we're really pleased we've been able to sign him.
"He is another talented addition to the squad and someone who is only going to get better working under Pep."
Kalidou Koulibaly had been City's top target but Napoli's sporting director Cristiano Giuntoli recently told Sky in Italy the defender would be staying with the Serie A side this summer, while Sevilla's Jules Kounde was also previously linked with a move to the Etihad.
City also denied placing a £78m bid for Atletico Madrid centre-back Jose Gimenez, after the La Liga club's president claimed he had rejected an offer for the central defender.
Otamendi, 32, won two Premier League titles with City following his arrival from Valencia in 2015.
"They were five wonderful years, not just in a footballing sense, but also at a club where they treat you in the best way possible, from the chefs to the kitmen, through to the backroom staff," Otamendi told the club's website.
"I've had the opportunity to win two Premier Leagues, to win the Carabao Cup, the FA Cup and the Community Shield. If you win titles it is because you are doing things well, and so I'm happy to have enjoyed these moments, and more than grateful.
"I was lucky enough since the first year I arrived to win a trophy, and later with the arrival of Pep to win even more. I am just happy to have played my part, with the support of my team-mates and the staff."
Speaking on Monday Night Football, Sky Sports' Jamie Carragher said:
"I look at Dias coming in and I think there's really a lot at stake for Man City with this signing.
"I think if this signing doesn't work and he's not a huge success, I don't think City can win the league. I don't see Pep Guardiola staying at the club next season, certainly if they don't win the league. Maybe if they win the league he might sign a new contract. But then I think it's debatable also.
"And that is the big fear for me for Manchester City and this Pep project, there's so much riding on this.
"This is the guy to replace Vincent Kompany, if you like. £65m, a huge figure again, but if this doesn't work, I think it's possibly the end of the Pep project."
Sky Sports features writer Adam Bate:
"The expectation heaped on the broad shoulders of Ruben Dias could hardly be higher. It is not just the initial £62m fee that Manchester City have paid Benfica for his services as they seek to find a way to regain the Premier League title. It is the fact that he arrives to find his new boss sifting through the wreckage of the worst defensive display of his managerial career.
"Never before had a Pep Guardiola team conceded five goals in a game prior to the 5-2 defeat at home to Leicester on Sunday. And yet, these were familiar defensive problems, albeit as part of an unfamiliar Manchester City line-up. One without Sergio Aguero up front because of injury and David Silva in midfield following his departure in the summer.
"It is the loss of Vincent Kompany one year ago that was thrown into sharp focus on Sunday. This was the fixture in which he thundered home the winner in a 1-0 victory that ended Liverpool's last best chance to pip them to the Premier League title in May 2019. The juxtaposition between the joy felt that evening and the disarray at the weekend is clear.
"It is asking a lot to expect him to solve City's defensive problems alone. But Dias could be the start of the solution, not just in his own performances but in helping to improve the performances of those around him. They are buying a model professional. They are going to need that and more."
Speaking after City's 5-2 defeat to Leicester, Sky Sports' Gary Neville said:
"They were so good in the opening 25 minutes but as soon as Leicester broke on them a couple of times, you felt that, psychologically, it just damaged them.
"Some of the wounds from last season are reappearing. The bugs that cost them the title. Certainly, you can get at this Manchester City back four a lot quicker that you could previously. They don't seem to react in transition higher up as they did."
On the three penalties: "Three different players making the same basic error. Rashness. Naivety. Whatever you want to call it, it is there in that backline. Pep Guardiola is looking to see if he can defend his players but I am not sure he can.
"His defenders aren't good enough, whichever way you want to look at it. He is a great coach, one of the greatest coaches of all time. But one-on-one, once his defenders get in those positions, they are really poor. It is almost like in their mind they cannot get their head around the fact that someone has got goal-side of them."
Live Premier League
Summer transfer window - key dates and times
The summer transfer window closes at 11pm on Monday October 5 with a feast of activity lined up on Transfer Deadline Day on Sky Sports News and across our Sky Sports platforms.
A domestic-only window for deals between the Premier League and EFL then runs from October 5 and closes on Friday October 16 at 5pm. Follow all the news and analysis on SSN and across Sky Sports' digital platforms, including with our dedicated Transfer Centre blog.