Messi, who scored Barca's opening goal from the penalty spot, was replaced at halftime and coach Luis Enrique told a news conference the decision had been taken as a precaution.
"Tests conducted this morning on first-team player Lionel Messi have ruled out a hamstring injury in the right leg and he is merely suffering some mild discomfort," Barca said in the statement on their website (www.fcbarcelona.es).
The Spanish and European champions did not say if the FIFA Ballon d'Or holder would be available for Wednesday's King's Cup quarter-final, first leg at Bilbao.
Messi missed two months late last year with a knee injury but has looked close to his best in recent weeks.
News that makes sense
Your trusted source for staying up-to-date with the world around you. Get free daily news updates and analysis, straight to your inbox.
Barca's Spain fullback Jordi Alba also had to come off in the second half on Sunday after damaging a thigh muscle and medical staff said he would be out for around 10 days.
(Writing by Iain Rogers, editing by Justin Palmer)
