BARCELONA, Spain — Barcelona says Lionel Messi will be out for three weeks with a groin strain in his right leg.

The Argentina star walked off in the 58th minute of the Spanish league match against Atletico Madrid at Camp Nou that ended 1-1.

Messi asked to be substitute moments after a sprint while challenging for the ball with Diego Godin. He appeared to grimace while touching his right thigh.

Arda Turan replaced him after a hasty warm-up.

Barcelona was leading the match 1-0. Atletico leveled moments after Messi left.

Barcelona’s next match is at Sporting Gijon on Saturday. It then plays Borussia Moenchengladbach in the Champions League next Wednesday.

If Messi recovers within the three-week time frame given by the team, he will be back in time for Barcelona’s highly-anticipated match against Manchester City in the Champions League on Oct. 19.