Andres Iniesta's first-half goal gave Barcelona a 1-0 victory at third-tier Hospitalet on Wednesday in the first leg of their Copa del Rey series.
Iniesta scored with a long-range shot that dipped out of the reach of goalkeeper Jose Moragon in the 42nd minute on the artificial turf at the Feixa Llarga stadium.
Despite a lower-tier opponent, Barcelona coach Pep Guardiola sent out a near full-strength line-up that included Cesc Fabregas, Xavi Hernandez, David Villa and Carles Puyol, although Lionel Messi is away on international duty.
But the third-division hosts did well to repel and limit the Spanish champion's potent attack, which goes into the December 21 return leg with an unexpectedly thin lead.
Moragon starred for Hospitalet as Villa, Seydou Keita and Fabregas all tested the Spanish keeper before Iniesta gathered a pass from Fabregas outside the area and stepped up to fire a right-footed shot into the top left corner.
Barcelona extended their unbeaten start to the season to 19 games, including Spanish and European Super Cup triumphs.
A crowd of 6,294 watched a match that was moved forward to accommodate the European champion's Club World Cup appearance in December.
The first leg of the other 15 fourth-round games are scheduled for December 13, with Real Madrid at third-division Ponferradina.