Athletic Bilbao secured a first-leg advantage over Barcelona in their Copa del Rey last-16 tie despite finishing the match with nine men.
Two goals in three first-half minutes from Aritz Aduriz and Inaki Williams put the hosts in control against the 2016 champions.
Lionel Messi reduced the deficit from a free-kick after the break.
Messi also hit the post in stoppage time after both Raul Garcia and Ander Iturraspe had been shown red.
“We struggled at the start,” admitted Barca boss Luis Enrique.
“In the second half we concentrated more on what we could control, our play, and I think we did enough to deserve more, even taking into account Athletic’s numerical disadvantage.”
Forwards Messi, Luis Suarez and Neymar started the match despite only returning to training on Monday after the winter break.
This is the sixth time Barca and Athletic have been paired together in this competition in nine seasons, including three finals.
No side other than Real Madrid has eliminated Barca from the cup since 2008.
The return leg will be played at the Nou Camp on Wednesday, 11 January.