Every superhero story follows the same basic pattern: we meet the protagonist when he or she is young and witness them discover and experiment with their powers, before a tragedy imbues them with a sense purpose and spurs them on to change the world.

Later, we see what happens as they come to terms with being effortlessly more capable than everyone else. Invariably, the world changes and so does the protagonist. Things get nastier and being a superhero stops being fun. The protagonist has heartfelt conversations with their friends and family about whether or not they should give up, disappear and try to live a normal existence elsewhere.

It turns out that the choice isn’t really theirs: the world needs them to be superheroes whether they want to or not. This realisation is usually the final piece in the jigsaw and once the protagonist has come to terms with it, they put the cape back on and start enjoying their powers again.

They never quite recapture the youthful joy which made the initial phases of discovery and growth so exciting, but they learn to refine their abilities and use them as efficiently and effectively as possible. They usually do this by teaming up with others to form all-conquering partnerships or teams which maximise the abilities of all involved.

Lionel Messi is probably the closest thing that has ever existed to a superhero. No-one who was there when the five-year-old Messi first played for Grandoli FC in the Rosario barrio of General Las Heras will ever forget it. He might as well have lifted a parked car above his head or jumped over one of the tower blocks around the corner from the small, mosquito-covered pitch. It was instantly obvious that little Leo was destined for greatness.

Over the years that followed, Messi lived in the shadow of his incredible ability. He hadn’t yet fully mastered it, but he knew that he was special and could easily do things that other people could only dream of. Football remained a passion more than a profession, but he knew that one day the secret would get out and his natural ability would make him famous.

The tragic event that changed everything came when he was 13, when he left his family and friends and moved halfway across the world to enter FC Barcelona’s academy. It might not sound so bad in retrospect, but for a painfully shy boy who struggled badly with anxiety and depended on his immediate relatives for almost everything, it was a hammer blow. Like every superhero, however, Messi harnessed his pain and used it as fuel for the fire that burned inside him, driving him on to succeed while others fell by the wayside.

By the time Messi was promoted to the Barcelona first team, he was as dedicated as he was gifted and there was no stopping him. Even though he had achieved virtually nothing in the game, his teammates respected him. They knew they were in the presence of a supernatural talent. "This award says I'm the best player in the world," Ronaldinho said when accepting the 2005 Ballon d’Or, "But I'm not even the best player at Barcelona."

Everyone knows what happens next. Messi became the best player in the world and arguably the best ever to have kicked a ball. At 27, he has won everything there is to win at club level on several occasions. He was a couple of missed chances away from winning the 2014 World Cup, a tournament in which he dragged a drab Argentina side to the final almost single-handedly. On Saturday he scored his 400th career goal.

Despite this, there is a sense that all is not well with Messi. Having started so young, he now has a disproportionate number of miles on the clock for a player of his age. His last season was disrupted by injuries and off-field problems. After years of spectacular success the wheels came off at Barça, where Tata Martino, Messi’s own handpicked manager, failed to motivate and maintain him and the rest of the team.

The malaise continued into the World Cup. Although he scored four of Argentina’s goals at the World Cup and set up another two – eventually winning the Golden Ball as FIFA’s player of the tournament – his performances were underwhelming. He looked short of breath, lacking in acceleration and unable to dribble past whole teams at will in the manner which his fans have come to expect. The impression was that he wasn’t having fun on the pitch any more.

The truth is that the world had changed – and so had he.

When Messi first broke into Barcelona’s first team, football was much more anarchic than it is today. Even though clubs as big as Barça held a huge advantage over other domestic rivals, most teams still came to places like the Nou Camp and played for a win. There was no such thing as ‘parking the bus’. Teams occasionally placed all eleven men behind the ball to protect a result, but to do so for entire matches, with painstaking organisation and limitless defensive resolve, was unheard of.

It helped that Messi, the new kid on the block, had world-renowned attackers to work with and learn from. Ronaldinho famously took Messi under his wing both on and off the pitch, while the likes of Samuel Eto’o, Thierry Henry and David Villa occupied defenders and the openness of the opposition gave Messi space and time in which to maximise his unbelievable ability.

Messi became the best inside-forward in the world, then the best striker, and eventually the best playmaker. Barça’s fluidity meant that he could often move between each of those roles in a single game, dropping into pockets of space and driving at defences from different angles, playing perfect passes to teammates in goalscoring positions or arriving in them himself.

Although he was always Pep Guardiola’s Barça’s best player, the team wasn’t really his. The strings were pulled by Xavi Hernández, Andrés Iniesta and either Yaya Touré or Sergio Busquets in midfield and by Guardiola from the dugout. Messi, the best attacker in the world, was the icing on the cake: the gift from the gods that turned the best team in the world into the best team in history.

After a while, football became so easy for Messi that he stopped celebrating goals. He had responded to his early strikes with instinctive glee and slight disbelief, as if totally overwhelmed by the happiness he felt in those moments. By 2012, when he was regularly scoring a couple of goals in every game, he was often unmoved, barely mustering a smile when the ball hit the back of the net.

He started chipping goalkeepers whenever he was one-on-one, as though he was tired of simply rolling the ball past them and into the bottom corner. Never one for unnecessary flair, he started trying backheels and roulettes, seemingly because he wanted to know if whatever he tried would work automatically. He was in the form of his life, breaking scoring records left, right and centre, but at times he just looked bored.

Inevitably, things began to unravel. Barça’s opponents became increasingly solid defensively and learned how to exploit a well-documented vulnerability to counter-attacks. Guardiola walked away, exhausted. Tito Vilanova, a huge influence on Messi, succeeded Pep, but he was soon gone, taken from his job by the illness that would eventually take his life. Martino followed, but he couldn’t stop the ravages of time turning key players like Xavi, Iniesta, Carles Puyol and Dani Alves into passengers.

As importantly, Martino couldn’t stop Messi deciding to become his own person. When Guardiola became Barça manager, he tasked physiotherapist Juanjo Brau with devising a personal programme for Messi that regulated almost every aspect of his life: what to eat, when to eat it; what to drink, when to drink it; what to stretch, when to stretch it; when to sleep, how to sleep. Brau followed him everywhere ensuring that he stuck to the regime. No lifestyle choice that could be left to Messi was his to take. He was more or less a robot.

Under Tata, Brau was ‘promoted’ and no longer worked with Messi. Although Messi said he stuck to the regime, there was no-one making sure that he did. Slowly but surely, the muscle injuries that had plagued his career before Brau began shadowing him came back. It was obvious that Messi wasn’t following his programme – but, at the same time, completely understandable.

Always a family man, he had become a father for the first time and was spending all of his available time with his son and his girlfriend. He was clearly very happy away from the pitch, probably for the first time since he left Rosario as a child. After years of giving everything to Barça, football was no longer his life; it was his livelihood, his passion and his superpower, but not his number one priority.

Despite this sea change, Messi found himself carrying Barça, scoring and making almost all of the side’s goals. David Villa had declined sharply and been sold; Pedro Rodríguez was horribly out of form; Alexis Sánchez and Cesc Fàbregas were clearly talented but didn’t quite fit in, and their unreliability placed even more pressure on Messi’s shoulders.

As if that wasn’t stressful enough, the board were toying with the idea of selling him. The club had always been good to Messi, paying for the growth hormone injections that allowed him to make it as a footballer and ensuring that his status as the world’s best player was matched by his pay packet, but the board were intent on heading in another direction with Neymar as the team’s new symbol.

Suddenly, being a superhero was anything but fun. Messi always wanted to stay at Barça but he made his feelings clear: if Sandro Rosell and company wanted him gone, all they had to do was say and he would pack his bags and leave. For a while it seemed not only that Messi might be forced out, but that he might actually welcome a change of surroundings.

Everything has changed this season, however. Rosell’s departure, a new contract signed in May and the system devised by new manager Luis Enrique seem to have combined to make Messi realise that even if he wanted to walk away from Barça, it never really was up to him to decide whose superhero he was. Barça need him more than words can say. The club is where he belongs and where his ability is best served. Maybe the World Cup made him understand that to take his superpowers elsewhere would be to lessen them.

This happy realisation has arrived, as it usually does in superhero literature, with a timely replenishment in the supporting cast. Fresh impetus has been provided by Luis Enrique’s arrival and a host of new signings. Luis Suárez has yet to come into the team, but it’s easy to see where he will fit in when his ban ends. Neymar has stepped up to the plate, too. The Brazilian had a tough debut campaign in La Liga but has developed splendidly and is now a player worthy of sharing the limelight with Messi.

It’s not a surprise that the new Barça have looked like a work in progress in most of their matches at the start of this season, but it’s even less surprising that Messi has been brilliant regardless. He has started deeper, playing as a classic number ten more than as a false nine or an inside-forward, but despite being relatively far from the goal he has still scored five times and racked up eight assists in the opening seven games.

Messi's understandings with Busquets and Neymar have come to the fore. The former knows when and where to give Messi the ball, while the latter knows when and where to run to receive his defence-splitting passes. The three have already combined for four goals this season. Messi's unmatched intelligence has also made it easy for Munir and Sandro to come into the team as orthodox strikers.

Some observers have looked at Cristiano Ronaldo’s superior goalscoring figures and compared them to Messi’s to prove that the current holder of the Ballon d’Or has a clear advantage in their ongoing personal duel, but this is nonsense. Messi’s new role means that it would be wrong to judge him purely on goalscoring: when one looks at combined goals and assists numbers, Messi leads Ronaldo. As ever, the difference is that Messi doesn't only contribute as an individual: he makes his teammates better too.

Another popular complaint from Messi’s critics is that he no longer scores goals as breathtaking as the classic solo slaloms against Getafe, Real Zaragoza and Real Madrid, to name just a few. There might be something in that, but if there is it’s not his fault: circumstances dictate that these days he spends more time picking the lock instead of blowing the door off its hinges. Regardless of his method, there's no doubt that Messi is still capable of deciding any game in a second.

Perhaps Messi’s critics just haven’t seen enough superhero films. If they had, they’d know better than to write off the protagonist. In the end, he always comes out on top.