Premier League club Manchester City have agreed a deal to sign Benfica goalkeeper Ederson Moraes for €40 million (£34.7m), the Portuguese side have announced.
Ederson, 23, underwent a medical at City on Tuesday before sealing his move to Pep Guardiola's side on a five-year contract.
Benfica confirmed the deal in a message to the Portuguese stock exchange, which read: "In accordance with and for the purpose of Article 248 of the Securities Code, Benfica have reached an agreement with Manchester City Football club Limited for the transfer of the athlete Ederson Santana de Moraes for a fee of €40,000,000 (forty million euros) if there is a commitment to deliver 50% of the added value obtained in this transfer to third parties."
City are yet to formally announce the signing.
- SL Benfica EN (@slbenfica_en) June 1, 2017
Following his medical in Manchester, Ederson returned to Lisbon and told A Bola: "I'm very happy! The first impressions were very good."
The Brazilian played in Benfica's Portuguese Cup final triumph on Sunday and said after the match: "This was probably my last game for Benfica."
Sources earlier this week told ESPN FC that City agreed to pay the fee of around £35m for Ederson, which would make him the most expensive goalkeeper in history in pounds sterling, although the £33m Juventus paid Parma for Gianluigi Buffon in 2001 is a higher fee in euros.
Ederson, who joined Benfica in 2015 from Rio Ave in his homeland, will become City's second signing of the summer following a £43m deal for Monaco's midfielder Bernardo Silva.
His arrival will put pressure on Chile international Claudio Bravo, who joined the club last summer from Barcelona but endured a difficult first season.