Liverpool's pursuit of long-time target Mario Gotze is now all but over, with official confirmation that the underused Bayern Munich playmaker will return to former club Borussia Dortmund on a four-year contract, medical permitting, rather than follow old boss Jurgen Klopp to Anfield.

A product of Dortmund's youth academy, Gotze lifted two Bundesliga titles, the DFB-Pokal and finished as a Champions League runner-up under Klopp, before controversially defecting to their key rivals and Wembley conquerors in 2013.

Although specifically targeted by Pep Guardiola, who replaced treble-winning manager Jupp Heynckes that summer, the 24-year-old subsequently struggled for recognition and made just 73 league appearances during an underwhelming and injury-hit three-year spell.

The presence of his former mentor at Liverpool led to persistent links over a potential switch to Merseyside, while Bild reported earlier this month that Tottenham Hotspur had also entered the race for his signature. But any lingering chances of a move to the Premier League were scuppered over the weekend when Bayern chairman Karl-Heinz Rummenigge confirmed widespread rumours that talks with Dortmund and Gotze's agent had indeed taken place.

"When I completed the switch from BVB to FC Bayern, it was a conscious decision and one that I do not wish to hide from today," a philosophical Gotze told Dortmund's official website on confirmation of his return. "Three years later, and now at 24 years of age, I am able to see the decision I made back then differently.

Twitter/@BVB

"I can understand the fact that many fans were unable to understand my decision. Nowadays I wouldn't make the same choice again. If I am now to return to my hometown club, then I want to try to win everyone over – especially those who do not welcome me back with open arms – with my performances. My objective is to get back to playing my best football. For all of us, the club and the BVB fans."

While no official fee is mentioned, The Mail believes the deal to be worth approximately £22m ($29m). Dortmund sporting director Michael Zorc said that Gotze, scorer of Germany's extra-time winner over Argentina in the 2014 World Cup final, "consciously chose a path that would certainly not be an easy one" despite the existence of several other transfer offers.

"The negotiations were very fair and serious," Rummenigge said. "We'd like to thank Borussia Dortmund, Mario, his father, as well as his agent for that. I think the transfer is a good solution for all parties. FC Bayern thanks Mario Gotze for three years wearing the Bayern shirt and wishes him all the best for the future."

Gotze will join up with Thomas Tuchel's squad at the beginning of August, needing a period of rest after featuring four times during Die Mannschaft's run to the semi-finals of Euro 2016. He was unsuccessfully deployed as a 'false nine' by manager Joachim Low for the opening group games against Ukraine and Poland before moving back into a more familiar role against Northern Ireland.

He was dropped altogether for knockout ties against Slovakia and Italy and replaced Emre Can as a second-half substitute in the last-four defeat to France in Marseille.