Barcelona have reached an agreement with Manchester City to sign Ilkay Gundogan as a free agent when his contract expires on June 30, sources confirmed to ESPN.

Gundogan, 32, has agreed a two-year deal with Barca with an option for a third year, turning down an offer to extend his seven-season stay at City as well as proposals from Premier League side Arsenal and clubs in Saudi Arabia, sources said.

The deal is pending the results of a physical, which Gundogan underwent on Wednesday, sources said.

Barcelona's ongoing financial issues meant they explored the free agent market, and in March ESPN revealed that Barca were in talks with the Germany international.