Over the past few weeks, there has been increasing speculation about Lionel Messi's future

But on Thursday, Paris Saint-Germain head coach Christophe Galtier put some of the rumors to bed by confirming that the superstar player will leave the club when his contract expires this summer.

Two years ago, Messi arrived wearing a T-shirt emblazoned with "Ici C’est Paris" ("This Is Paris") – a favorite cry among Paris Saint-Germain fans. 

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Lionel Messi on the pitch

Argentina's Lionel Messi warms up for the World Cup final match between Argentina and France at Lusail Stadium in Lusail, Qatar, on Dec. 18, 2022. (AP Photo/Frank Augstein)

Early on, the fan base was energized by Messi's presence, but those cheers later turned to jeers and boos. The World Cup winner to bow out in PSG's league finale against Clermont on Saturday.

PARIS SAINT-GERMAIN'S SERGIO RICO 'FIGHTING TO RECOVER' AFTER BEING HIT BY HORSE IN SPAIN

"I had the privilege of coaching the best player in the history of soccer," Galtier said. "This will be his last match at the Parc des Princes, and I hope that he will receive the warmest of welcomes."

PSG recruited Messi in August 2021 with the ambition to finally win the Champions League. But the team has yet to achieve that goal. 

Lionel Messi dribbles the ball against Saudi Arabia

Lionel Messi of Argentina drives the ball during the World Cup match with Saudi Arabia at Lusail Stadium on November 22, 2022, in Lusail, Qatar. (Florencia Tan Jun/PxImages/Icon Sportswire via Getty Images)

Although PSG won its record-extending 11th French league title last weekend, it exited Europe’s top tournament in the round of 16 for the second straight season.

Messi's adventure in France has been bittersweet. In spite of pretty good statistics, he has been embodying the team’s shortcomings in the view of many PSG fans who have repeatedly whistled his name sarcastically in recent weeks.

Lionel Messi during a match

Lionel Messi of Paris Saint-Germain is shown during a match against Juventus Turin at Juventus Stadium on November 2, 2022, in Turin, Italy. (Jean Catuffe/Getty Images)

After struggling to adapt to the French league – the seven-time Ballon d'Or winner scored only six league goals in his first 26 games – Messi improved this season as he developed an efficient understanding with forward Kylian Mbappe.

Following a good start to the current campaign, Messi failed to replicate that form since returning from the World Cup that he won with Argentina.

Lionel Messi touches the World Cup trophy

Argentina's Lionel Messi touches the World Cup trophy after beating France on Dec. 18, 2022. (AP Photo/Petr David Josek)

Still, in 31 league matches, the 35-year-old Messi has scored 16 goals and delivered as many assists. In all competitions, Messi netted 21 times and had 20 assists for PSG.

"This year, he has been an important part of the team, always available, always committed during training sessions," Galtier said. "I don’t think any of the comments or criticisms are justified."

Despite Galtier's support, PSG's appreciation of Messi has not always been so positive.

Last month, the club suspended him after an unauthorized trip to Saudi Arabia. Messi has a commercial contract with Saudi Arabia to promote tourism and has been linked with a lucrative move there at the end of the season.

CLICK HERE TO GET THE FOX NEWS APP

There has also been talk of a return to Barcelona, where he spent the majority of his career, or to the United States to play in MLS.

The Associated Press contributed to this report.