Borussia Dortmund have confirmed Mats Hummels has agreed to join Bayern Munich.

Hummels' contract with Dortmund was set to expire after the 16-17 season and he wanted to rejoin Bayern.

Dortmund were demanding a €35 million transfer fee for Hummels.

Hummels, 27, is one of the world's best center backs, emerging as a star when moving from Bayern to Dortmund.

On Tuesday, Hans-Joachim Watzke said in a statement on Dortmund's official website: "Mats Hummels has decided after long, intense reflections to return to his native Munich, eight-and-a-half years after his move to BVB.

"I want to stress that he has always acted openly and fairly toward us. Mats won two Bundesliga titles and the 2012 double. He reached the 2013 Champions League final with us and won the 2014 World Cup as a Dortmund player.

"We respect Mats' decision and our wish for him and for BVB is that he gets the recognition he deserves in his last weeks as a 'black and yellow' and leaves Dortmund with the DFB Pokal in his hands."

Mario Gotze and Robert Lewandowski also moved from Dortmund to Bayern in recent seasons.