Xavi out of Spain friendly with Italy
Xavi was examined by federation doctors when the squad assembled outside Madrid on Monday but was deemed unfit for the match in Bari and will return to his club for treatment, the Spanish football federation said in a statement.
He is the second player to withdraw from Vicente del Bosque's team after Real Madrid defender Sergio Ramos, who has sustained a back injury.
The world and European champions called up Malaga's Nacho Monreal as a replacement for Ramos on Sunday but Del Bosque may decide to make do with the players he has to cover the absence in midfield.
The injuries to Xavi and Ramos put them in doubt for the traditional curtain-raiser to the new La Liga season, the two-legged Spanish Super Cup which starts on Sunday.
League champions Barca visit the Bernabeu and three days later King's Cup holders Real travel for the second leg at the Nou Camp.