Hosts Athletic Bilbao scored early and late on Wednesday, but Lionel Messi helped Barcelona claim all three points.
Lionel Messi scored twice as Barcelona ruined Marcelino's first match in charge of Athletic Bilbao with a hard-fought 3-2 triumph at San Mames.
Inaki Williams made an instant impression on Athletic's new boss - appointed following the dismissal of Gaizka Garitano - by scoring inside three minutes for the home team on Wednesday.
Capitalising on a ridiculously high defensive line, the forward ran clear from inside his own half and, after cutting back inside a half-hearted challenge from Clement Lenglet, fired low past Marc-Andre ter Stegen to break the deadlock.