Barcelona forward Lionel Messi says he has recovered from a leg injury and is ready to return to the pitch in time for his club's upcoming games against AC Milan and Real Madrid .

Messi posted on his Instagram account a photo of him kicking a ball with the message ''Ready to come back'' on Friday, a day before Barcelona's Spanish league game at Osasuna.

The 26-year-old strained his right thigh during Barcelona's 2-0 victory over Almeria on Sept. 28 and has been sidelined since.

Barcelona visits Milan in the Champions League on Tuesday before hosting Madrid on Oct. 26 in the season's first clasico.