It's official: Messi will be staying in Barcelona through at least 2021. Getty Images

Over four months after agreeing to a contract extension with Barcelona, Lionel Messi has signed it, ending any speculation that he could soon leave. The Spanish team announced on Saturday that Messi has penned the deal with the club, which will keep him at Barca through the 2021 season. Messi's previous deal was set to expire next summer, meaning that in January Messi could have started talking to other clubs about joining on a free transfer.

The Argentine superstar signed the deal on Saturday morning, with a buyout clause set at 700 million euros. By the time the deal expires, Messi would have spent a staggering 17 years with the first team.

Messi joined Barcelona back in 2000 as a 13-year-old and has, over time, produced what will likely go down as the most impressive statistical career in history. Messi has broken nearly every attacking record at the club, picked up countless awards, and won every competition with the team, more than once. He's also put himself next to, if not above, Diego Maradona and Pele as the best ever.

Messi enters Barcelona's clash with Valencia on Sunday with 523 career goals for the Spanish giants.

For news, stories, results and more, follow us:

- @CBSSportsSoccer - @RGonzalezCBS - Facebook