Mario Gotze will become the most expensive German player of all time when he completes his move to Bundesliga champions Bayern Munich in July.
Bayern have met the release clause in his contract with Borussia Dortmund, reportedly set at €37 million (£31.5 million).
The transfer beats the previous most expensive transfer involving a German player, when Stuttgart striker Mario Gomez also moved to Bayern in a £26.5 million move in 2009.
The Bavarian club announced the signing of the German international in a statement on their official website after Dortmund confirmed that the player had told them he wanted to make the move.
Gotze will arrive at the same time as former Barcelona coach Pep Guardiola, who will succeed Jupp Heynckes as boss this summer, having signed a three-year deal.
The statement read: "Bayern Munich confirm that the club have reached an agreement with national team player Mario Gotze that he will play for Bayern Munich from 1 July 2013.
"Bayern are prepared to meet the release clause agreed between Borussia Dortmund and Mario Gotze."
Die Schwarzgelben had earlier revealed that Gotze's agent had informed the club the 20-year-old wanted to move to the Allianz Arena.
Dortmund chief executive Hans-Joachim Watzke said on the club's website: "We are obviously disappointed beyond measure, but emphasise that both Mario and his advisors have behaved within the terms of the contract."
Dortmund have asked for fans to support Gotze against Real Madrid in their Champions League semi-final first-leg tie as they seek a place in the Wembley final against Bayern or Barcelona.
A Dortmund statement said: "Coach Jurgen Klopp and sporting director Michael Zorc asks all fans of Borussia Dortmund to support Mario Gotze unconditionally as they would any other player in the final games of the season, but especially in the important Champions League semi-final against Real Madrid."
Klopp's side recently relinquished the Bundesliga title they won in each of the past two seasons with Die Roten winning the 'salad bowl' in record time, with six games to spare. Bayern are currently 20 points ahead of second-placed Dortmund.
Gotze has emerged as one of the most coveted players in European football since coming through the ranks at Dortmund and making his Bundesliga debut in November 2009. He was previously linked with a move to the Premier League after attracting the interest of Arsenal and Manchester City.
He played a key role as Dortmund won back-to-back Bundesliga crowns and has so far made 22 appearances for Germany, scoring five goals.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies