Pep Guardiola's fourth season at Barcelona ended with four trophies but they weren't the ones that really counted and so, exhausted by his feud with Jose Mourinho, a souring of relations with president Sandro Rosell, and a feeling that he was no longer getting through to Lionel Messi, he walked away.

Manchester City feels like a different scenario this season but there are similarities too. There was a shortage of defenders capable of playing the Guardiola way and that brought problems back in 2011-12.

There were also strong emerging rivals, and a sense that the powers of the game were against his team winning the league once more.

There are similarities between Pep Guardiola's final year at Barcelona and the current season

Guardiola was unhappy with the refereeing performance in defeat by Liverpool last weekend

That season eight years ago started with the signing of Alexis Sanchez from Udinese and Cesc Fabregas from Arsenal when what many at the club felt was really needed was a new central defender.

In arguably the most demanding position in any Pep team, Guardiola had found it hard to replace Carles Puyol. Reinventing midfielder Javier Mascherano as a centre-back had worked for a couple of seasons but a new solution was needed and it could not be found.

Fabregas and Alexis became headaches for the coach. Sanchez was unwilling or unable to dovetail into a team inevitably led by Messi. And Fabregas, it seemed, did not fit in the XI.

The midfield was still Xavi, Sergio Busquets and Andres Iniesta so Guardiola took the side back to a previous standard formation for them under Johan Cruyff with three at the back and four in midfield.

Guardiola walked away from Barcelona after the end of his fourth season in 2011-12

Guardiola suffered from a shortage of defenders and struggled to integrate new players

Alexis Sanchez became a headache for Guardiola and was unable to dovetail into the team

The system enabled Cesc to play in the same team as Busquets, Xavi and Iniesta but the back three struggled to cope and Guardiola went back to 4-3-3.

As Barcelona's stranglehold on Spanish football supremacy slipped away Guardiola – who had thought about leaving the club after the 2011 Champions League final win over Manchester United – began to consider his options.

His friend Joan Laporta had been replaced as president by Rosell with whom he had far less rapport and it was no surprise when no one convinced him to stay.

There was also a powerful rival ready to capitalise on any weaknesses in that last year. Mourinho's Madrid weren't quite Jurgen Klopp's Liverpool but in a 2-1 win at the Nou Camp they did effectively seal the title and leave Guardiola without the big domestic prize in his final season.

It seemed that Cesc Fabregas, signed from Arsenal, did not fit into Guardiola's best XI

Guardiola was left exhausted by his ongoing feud with Real Madrid boss Jose Mourinho

Throughout the campaign there was also a sense of foreboding. It sometimes feels that Guardiola believed Barcelona would not win the league because greater powers were intent on making sure their domination came to an end. There was some of that in his: 'Ask Mike Riley and the big bosses about VAR' last Sunday.

After beating Atletico Madrid away in February in that final year at Barcelona he repeated: 'We are not going to win La Liga. We are not going to catch Real Madrid but we have to compete until the end.'

He toned down the line a few days later saying: 'there was little chance'. The gap was 10 points at the time and with far less time remaining.

The gap is only nine points now and there was no giving up in his post-match press conference. But cast the mind back to a win over Bournemouth in August when he said: 'The challenge this season will be amazing for us. The challenge after winning back to back titles will be great.'

It's almost as if he feels it's against the interest of the competition that the same team wins three times.

That will not be a justification in the Champions League and it may be the European competition that decides if he has a fifth season at City.

In 2012 Barcelona were knocked out of the Champions League by Chelsea - Manchester City's next rivals in the Premier League.