Lionel Messi will no longer play for FC Barcelona after all.

Messi reportedly agreed to a massive contract in July to return to the club, but Barcelona on Thursday confirmed the two sides could not reach an agreement over financial hurdles.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

"Despite FC Barcelona and Lionel Messi having reached an agreement and the clear intention of both parties to sign a new contract today, this cannot happen because of financial and structural obstacles (Spanish Liga regulations)," the club said in a statement.

"As a result of this situation, Messi shall not be staying on at FC Barcelona. Both parties deeply regret that the wishes of the player and the club will ultimately not be fulfilled.

SPANISH LEAGUE SECURES $3.2 BILLION IN FUNDS TO HELP CLUBS

"FC Barcelona wholeheartedly expresses its gratitude to the player for his contribution to the aggrandisement of the club and wishes him all the very best for the future in his personal and professional life."

Messi, 34, is one of the most well-known soccer players in the world next to Cristiano Ronaldo. His future, however, had been a mystery since he had his request to leave the club denied at the end of the 2019-20 season. He ended up staying and said he would reconsider his options when the season was over.

With Barcelona, Messi earned six Ballon d’Or awards. He is the team’s all-time leading scorer with 672 goals in 778 appearances and the top scorer in the Spanish league with 474 goals in 520 matches. He had played with Barca since 2004 when he was 17.

CLICK HERE TO GET THE FOX NEWS APP

It’s unclear what his next move is as there have been rumors a Major League Soccer foray could be coming up next.

The Associated Press contributed to this report.