Ernesto Valverde says Lionel Messi was substituted at half-time as a precaution after receiving treatment on his groin during Barcelona's 2-1 victory over Villarreal on Tuesday.

Messi, 32, went down after a challenge on the half-hour mark and needed lengthy treatment from the club's medical team. He managed to play on until half-time, when he was replaced by Ousmane Dembele.

- ESPN La Liga fantasy: Sign up now!

- When does the transfer window reopen?

The Argentina international injured his calf in preseason and made his first appearance of the new campaign as a substitute against Borussia Dortmund last week. He also came off the bench during the surprise 2-0 loss at Granada at the weekend.

He will undergo further tests on his latest injury concern ahead of Saturday's game at Getafe, but Valverde suggested he doesn't expect Messi to be sidelined for too long.

"It's a small groin problem, nothing more," the Barca coach said in his postgame news conference. "We decided to take him off as a precaution. It was not worth taking any risks. In principle, that's all it is."

Messi, starting his first game for Barca since last season's Copa del Rey final, had set up the opening goal for Antoine Griezmann at Camp Nou.

Arthur then doubled Barca's lead before Messi, who was in Milan on Monday to receive the award for best men's player at FIFA's football awards, was treated by team medical staff.

Lionel Messi received lengthy treatment on the sideline for a groin issue on Tuesday. Getty

Santi Cazorla pulled a goal back for Villarreal before the break, but Barca managed to hold on for an important three points as they bounced back from the Granada defeat with a win.

"We had some chances to extend our lead but we didn't take them," said Griezmann, who scored his third goal for the club since his summer move from Atletico Madrid.

"We're going to keep on getting better. We can do much better than this. We have to keep on working hard. There are new players, we've just got here and we have to keep on working.

"It's about adjusting to the style as quickly as possible. We're a long way from our best but with time we will keep getting better.

"The football is different. I knew it would be hard and that I would only get better with games. It's not going too badly, though. Three goals. Now to keep getting better. That's the path."

Barca return to La Liga action at Getafe this weekend in search of their first away win of the season. They have failed to secure a win in four games away from Camp Nou in all competitions this term.