Federer won the first point on del Potro's serve three times in a row in the second set with his famous "SABR" (Sneak Attack By Roger) approach, but couldn't convert.
However, big-hitting Del Potro - who beat Federer in the 2009 US Open final - emerged from the jaws of defeat to snap the Swiss' 17-match winning streak to open the season. "It's hard to describe with words, it's like a dream", del Potro said on court after extending his own winning streak to 11 matches.
He has won all five of his titles with straight sets victories in the final so he will fancy his chances of a sixth crown if he takes the opening set against Del Potro.
It was the first since 2014 to go to a third-set tiebreak. Federer faced the prospect of exiting the Indian Wells Masters when he trailed 5-7, 2-4 against the 21-year-old Croatian.
They stayed neck and neck until they went to a tiebreak, with Del Potro needing to save two set points in game 10. But trailing 15-40, Del Potro hit an incredible victor and then saw Federer put a shot wide of the mark.
An already tense match-up between the good friends exploded to life in the second set as Federer and his Argentinian opponent lashed out at the chair umpire and those in the stands. Then last September he beat him in the US Open quarter-finals giving Federer his only loss at a major in 2017.
"The people are screaming when I miss a first serve!" a filthy Del Potro yelled at Murphy in the second set as he demanded the official keep the crowd quiet.
"I had very bad moments a few years ago and I don't want to think about that anymore".
"This is the toughest I've been pushed this year, more than the Australian Open final."More news: SNOW IN LONDON: Capital hit today as forecast sparks ice weather warnings
But as they say, winning when you don't deserve to is the mark of a true champion.
"It took a while to get the record", Federer said.
"I was lucky in both sets with early breaks", Del Potro said afterwards. "And I have been there so many times".
Del Potro survived three match points before clinching the championship in the tiebreaker, ending a two hour, 42 minute marathon contest on the main stadium court.
Yes, del Potro is still lovable. "But for now I will play faster points, but I'm always happy to extend the rallies, too, because I feel like I can also back myself there".
Federer leads their head-to-head record 18-6 and beat the tall Argentine thrice in their four meetings past year.
The standard wasn't always flawless - both players made uncharacteristic unforced errors as Del Potro's forehand failed him and Federer's backhand didn't come to the party.