Bayern Munich and Manchester City have agreed a fee for Jerome Boateng and the defender will join the Bavarians subject to a medical, which he will undertake in the next few days.
Boateng had already agreed terms on a four-year contract, but City were reluctant to sell the Germany international, leading Bayern chief executive Karl-Heinz Rummenigge to accuse them of refusing to discuss the transfer.
But the two clubs have now managed to thrash out terms, though neither disclosed the fee - thought to be in the region of £15 million.
Rummenigge told the club's official website: "There were intense negotiations and it took a long time to conclude the agreement, but we have reached a satisfactory conclusion. With Jerome Boateng, we have got our first-choice central defender."
Boateng joined City from Hamburg in a £10 million deal last summer but struggled with form and fitness in 2010-11, making just 16 Premier League appearances.
Bayern's spending appears unlikely to end with the acquisition of Boateng, with manager Jupp Heynckes optimistic about completeing the signing of Chile midfielder Arturo Vidal from his former club Bayer Leverkusen.
Vidal has just one year remaining on his contract but Leverkusen insist the midfielder will not be allowed to join another side in the Bundesliga.
Heynckes said: "He will not go to Juventus and won't be looking at joining Lazio, Roma or anywhere else.
"Arturo Vidal is coming to Bayern. If not this summer then next, but I don't imagine Leverkusen want to give up their chance to secure some money for him."