Messi trained alone in the morning before joining his team-mates in the afternoon.
Madrid: Lionel Messi gave Barcelona a timely boost on Wednesday by returning to training with the rest of the squad after a calf injury.
Messi trained alone in the morning before joining his team-mates in the afternoon, increasing hopes that Barca's captain could play a role against Real Betis in La Liga on Sunday.
He strained his calf on August 5 in his first training session back following the Copa America and subsequently missed the club's pre-season.
It would be a surprise if Messi started at Camp Nou, but Barcelona coach Ernesto Valverde will be eager to have his star available again, particularly after his team suffered a surprise 1-0 defeat by Athletic Bilbao in their opening league game last weekend.
Messi's absence has been compounded by injuries to other strikers.
Luis Suarez is expected to be out for around a month after hobbling off with a calf problem against Bilbao. Ousmane Dembele injured his hamstring and will need five weeks to recover.
Antoine Griezmann, the 120 million summer signing from Atletico Madrid, is the only fully-fit forward, with Rafinha and 21-year-old Carles Perez possible options to play behind him.
The shortage up front has intensified speculation that Paris Saint-Germain's Neymar could return to Barcelona before the transfer window closes in Spain on September 2.
PSG sporting director Leonardo admitted earlier this month that the club were in "advanced negotiations" to sell Neymar but a deal is yet to be agreed with Barca, who have already spent around 250 million euros this summer.