Two titans of German football played out a thriller on Dortmund.