Both sides were in southern Spain gearing up for the second half of their campaigns in the Bundesliga and Eredivisie respectively, and the crowd was treated to a high-tempo game with five goals shared.
Thomas Tuchel's charges had a goal ruled out for offside in the 16th minute before Shinji Kagawa won a penalty not long after, which Marco Reus failed to convert thanks to an acrobatic save from Jeroen Zoet.
In the 19th minute, however, the German side managed to break the deadlock as Reus made amends from his spot kick, and five minutes before the break Ousmane Dembele's cross was drilled home by Kagawa.
Dortmund overhauled their entire team for the second half and made it three shortly after the restart, Emre Mor's chip into the box falling perfectly to Andre Schurrle, who skilfully volleyed past Zoet.
However, Christian Pulisic restored his side's three-goal advantage in the 74th minute when he collected Schurrle's ball and fired home for goal number four.