The match ended 6-7 6-1 6-7 6-1 6-3 after four hours and six minutes and it sealed Croatia’s place in the final for the second time in three years.
Earlier the partisans at the Sportski Centar Visnijk were stunned when the country’s top player Marin Cilic lost in four sets to Sam Querrey.
Cilic, the world number six, won the opening set 7-6 and held five sets points in the second set tiebreak. But Querrey, the world number 61, reeled off seven consecutive points to take the shoot-out eight points to six.
To the horror of the raucous partisans, Cilic never recovered. Querrey claimed the third 6-3 and the fourth 6-4. That levelled the best of five series at 2-2.
Ultimately Querrey’s heroics were to no avail. Coric, featuring in his 16th Davis Cup match, edged Tiafoe who was playing in only his second match in the competition.