Rafael Nadal heroically won the first reverse singles against Argentina's Juan Martin del Potro to give Spain a fifth Davis Cup tennis title.
The world number two recovered from a 6-1 drubbing in the opening set of the fourth rubber to win the next three sets 6-4 6-1 7-6, after del Potro had a chance to level the match at 5-3 up in the fourth set.
Spain first won the Davis Cup in 2000.