Money came between Barcelona and Lionel Messi.

Barcelona said the player wanted to stay. The club wanted the same.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

They even shook hands on a deal.

But in the end the club's dire financial situation made it impossible.

Letting Messi go was the only way of saving the club, and just like that Messi's era at Barcelona came to an end.

President Joan Laporta said Friday that keeping the Argentine star would be risky, and not even the greatest player in the world was worth jeopardizing the club’s future.

"We think Barcelona is above all," Laporta said. "The club is over 100 years old and is above everyone, even above the best player in the world. The club goes over players, coaches, presidents."

Laporta spoke a day after the club announced the negotiations with Messi had ended.

Laporta blamed Barcelona’s previous administration for the club’s dire financial situation, which kept it from fitting Messi’s new contract within the Spanish league’s fair play regulations.

He said he hoped the league would have been more flexible with its rules but understood that it couldn’t make an exception even if that meant losing Messi.

"There are objective reasons regarding the economical situation at the club and an investment of that volume with the contract of Messi was risky," Laporta said. "We wanted to assume those risks, but when we realized the real situation of the club after the audit, it meant that we would have put the club in great risk."

He said Messi and the club did everything to make the contract work but it wasn't possible without hurting Barcelona's finances. The first deal rejected by the league was a two-year contract payable in five years, and the second was a five-year contract.

"There comes a moment when you need to say ‘enough’. You need to analyze rigorously with a cold head and look at the numbers," Laporta said. "And in the Spanish league we have to abide by the rules. We think they could be more flexible, but that’s not an excuse, we knew the regulation. We couldn't abide by it because of the inheritance we had."

Laporta said Barcelona’s losses doubled from about 200 million euros ($235 million) to 400 million euros ($475 million). The club's debt recently was at more than 1 billion euros ($1.2 billion), and that wasn’t only because of the coronavirus pandemic.

"There is no margin after a calamitous situation that was all down to the previous board of administration," he said.

Former President Josep Bartomeu resigned last year along with his board of directors amid his fallout with Messi and the club's financial struggles.

The Spanish league has prided itself in having some of the stricter economic controls for clubs in Europe, keeping them from overspending and going into heavy debt. With these controls it was able to create a much stable and stronger league in the last few years.

Barcelona’s salary cap, which is roughly proportional to 70% of a club’s revenue, was expected to be slashed even further this season. Laporta said for every 25 million the club spends on a player, it has to make up 100 million in cap space, which "is not an easy process." He said the club was already at its limit without the Messi contract.

Laporta said new funding recently secured by the league worth 2.7 billion euros ($3.2 billion) would have helped but the club was against the deal because it would have hurt the team’s broadcasting rights revenues for the next 50 years.

"We are not going to increase our salary limit by selling our audiovisual rights for the next 50 years," Laporta said. "This decision would have been risky."

CLICK HERE TO GET THE FOX NEWS APP

League President Javier Tebas contested Laporta's argument and hinted that the new funding, which is also opposed by Real Madrid and still needs to be approved by the majority of the clubs, would be a solution to keep Messi at the club. He said Laporta had been initially in favor of the deal but suddenly changed his mind.

Messi is leaving after leading Barcelona into its most glorious years. He helped the club win 35 titles, including the Champions League four times, the Spanish league 10 times, the Copa del Rey seven times and the Spanish Super Cup eight times.

"Still trying to assimilate everything already knowing how difficult it will be," midfielder Sergio Busquets said on Instagram. "I can only thank you for what you have done for the club. You arrived as a kid and are leaving as the best player in history, having made this club grow to the height that it deserves."

The 34-year-old Messi was yet to make any public statements, and there was not immediate news on his future. Paris Saint-Germain was considered the front-runner to sign him after Manchester City coach Pep Guardiola all but ruled out the possibility of adding Messi to his squad.

"Leo wanted to stay, so he is not happy," Laporta said. "We all wanted him to stay. But for him right now it’s a situation in which he has to confront reality. It's a reality that can't be changed. I wish him the best wherever he goes."