MADRID -- Lionel Messi returned to training with Barcelona on Monday, almost two weeks after he told the club he wanted to leave.

After reluctantly changing his mind, Messi was back with the team to prepare for the new season. The club said he practiced separately from the rest of the squad because he still needs to undergo a second coronavirus test before rejoining his teammates.

Messi said last week he wasn't happy with Barcelona but would rather stay than get into a legal battle with the “club of his life.” Messi wanted to leave for free but the Catalan club said the contract clause he invoked had already expired, so he has to stay at least until the end of his contract in June 2021.

Messi told Barcelona he wanted to leave on Aug. 25 and had not reported for the squad's required coronavirus testing a week ago. He also had not showed up when his teammates resumed training last week.

The Spanish league begins this weekend, but Barcelona will not start its season until the end of the month with a home game against Villarreal.

Messi was one of the first to arrive at the team's training centre in Barcelona on Monday. He was expected to personally meet with incoming coach Ronald Koeman for the first time.

Koeman replaced Quique Setien after the team's embarrassing 8-2 loss to Bayern Munich in the quarterfinals of the Champions League on Aug. 14.

The Dutch coach talked to Messi shortly after that loss and was informed by the Argentina star he wasn't expecting to stay.

Club president Josep Bartomeu later said that keeping Messi was a priority, as Koeman's project revolved on the player.

Messi complained of Bartomeu after announcing he would stay, saying the president didn't keep his word to let him leave after the season. Messi said he told Bartomeu he wanted to leave several times during the season.

Koeman was not planning on keeping some key players, including Samuel Umtiti, Arturo Vidal and Luis Suarez, a longtime Messi teammate and friend. They also were back to training on Monday.

Ivan Rakitic, who also wasn't in Koeman's plans, reached a deal to transfer to Sevilla last week.

Barcelona had its first two Spanish league games postponed because it played later into the season in the Champions League. The club has scheduled a friendly against third-division club Nastic on Saturday.