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.
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.