The position that Pep Guardiola stepped into at Bayern Munich three years ago this summer was not, in many ways, an enviable one.

The Spanish coach was preparing to take over a team that had just won the Champions League, Bundesliga, and German Cup in one of the most successful seasons in the club’s storied history. There was virtually no room for improvement. Nothing to build towards.

But Guardiola’s was also a position that no other manager could have attained. When he arrived in Germany in 2013, Guardiola wasn’t just a manager. He was the manager.

That’s the why Guardiola got the job. If it had been any other coach returning from a year long sabbatical, Bayern wouldn’t have been interested. They would have happily continued winning under well-liked German coach Jupp Heynckes.

But Guardiola chose Bayern, and Bayern was thrilled. And because it was Guardiola, it didn’t matter that Heynckes was well on his way to winning the treble. He was moved aside.

Bayern’s press release announcing the hire of Guardiola in the middle of the 2012-13 season insisted that the Heynckes was retiring – a stance that was later compromised by the admission of then-Bayern general manager Uli Hoeness that the German coach was retired more than he was retiring.

Bayern should have been careful what they wished for. Guardiola hasn’t been a failure in Germany, per se – his team is about to clinch a third Bundesliga title in three years – but he certainly hasn’t been an qualified success.

On Tuesday night, Bayern exited the Champions League against Atletico Madrid on away goals – their dramatic 2-1 victory in Tuesday night’s second leg not enough to overturn a 1-0 deficit from the Vicente Calderon Stadium.

It’s a defeat that means Guardiola – who announced in December that this would be his last season at Bayern – will exit the club without a Champions League success. In all of his three seasons, Bayern lost in the semifinals.

There were rationales for those defeats – especially when an injury crisis deprived Bayern of a fair shot against Barcelona last year – but the collective of losses against three different Spanish clubs is a difficult one to reconcile.

SEE MORE: Ilkay Gundogan can be a key presence at the crux of Guardiola’s Manchester City

The first of those losses was an absolute humiliation against a Real Madrid team coached by Carlo Ancelotti, the man who has been lined up to take over for Guardiola in Munich next season.

And Guardiola has done Ancelotti another favor. By failing to win the Champions League this year while building a superb and flexible team, he’s made himself a fine act to follow.

And some in Munich may greet Ancelotti with open arms for reasons separate from soccer.

From taunting Bayern’s team doctor of 40 years into resignation last year, to his classless refusal to shake Caleb Porter’s hand at the 2014 MLS All-Star game, Guardiola was, at times, petulant and difficult to work with.

Removed from the haven that was Barcelona at the beginning of his coaching career, Guardiola struggled in stressful moments – both to win games, and to hold his nerve.

Make no mistake: Bayern played terrific soccer under Guardiola, and they had plenty of success. But unmitigated success in Germany was always going to be extremely difficult to achieve. Guardiola’s timing made sure of that.

But the timing at Manchester City – the club announced as Guardiola’s next destination in February – might be just right.

It’s a club in desperate need of rebuilding and refocusing – not just in terms of personnel, but also in terms of football philosophy.

SEE MORE: Schedule of Premier League games on US TV and live streaming

This job isn’t a slam-dunk. Even though the Premier League appears wide open next year, City weren’t even close to winning it this term. Despite their valiant Champions League run, the Citizens have looked more tired than inspired for the better part of two years.

If Guardiola can make European champions out of City, he’ll have done something truly remarkable. With the anomaly of Chelsea’s extraordinary run in 2012, English teams have been an afterthought in the Champions League since the turn of the decade.

Conquering England, and then Europe via England, will be the most difficult challenge of Guardiola’s career.

The core of his Barcelona teams was already in place when he was hired. It was much the same at Bayern, where, despite a host of big-money signings, the club’s most important players were the same men who won the treble under Heynckes’ direction.

At City, though, Guardiola will be able and will very likely have to build from the ground up.

Roberto Mancini and Manuel Pellegrini, City’s last two managers, were both very capable in their very different ways. But Guardiola has held the mantle of savant. This next stint will show us if he’s really a cut above – or just a very good coach who has coached very good teams.