Roger Federer
Roger Federer (L) lost to Juan Martin del Potro in the finals of the BNP Paribas Open. In this picture, Argentina’s Del Potro shakes hands with Federer at the trophy presentation after a three-set victory in the ATP final during the BNP Paribas Open at the Indian Wells Tennis Garden, California, March 18, 2018. Harry How/Getty Images

Juan Martin Del Potro ended Roger Federer's unbeaten start to 2018 after defeating him in three sets during the final at Indian Wells on Sunday.

Federer was enjoying his best-ever start to a tennis season after his win over Borna Coric in the semi-final that took his tally to 17 wins with no losses as he was the favorite for a third title of the year heading into the final. However, it was Del Potro who emerged victorious as he defeated the 36-year-old in a thrilling 6-4, 6-7, 7-6 victory in California to claim the first Masters 1000 title of his career.

Roger Federer and Juan Martin Del Potro
Roger Federer congratulates Juan Martin Del Potro after the final. Pictured: Del Potro shakes hands with Federer at the trophy presentation after a three-set victory in the ATP final during the BNP Paribas Open at the Indian Wells Tennis Garden in Indian Wells, California, March 18, 2018. Harry How/Getty Images

Despite the Argentine taking the first set, it looked like Federer was going to mount another comeback after saving a match point to win the second set before being a match point away from victory in the third set at 5-4, leading 40-15. However, Del Potro saved a remarkable three match points to take the third set into a tie-breaker before beating Federer for the seventh time in 25 meetings between the duo.

"It's so big," Del Potro said after the final. “I cannot believe I won this tournament, beating Roger in a great final and level of tennis. We played great tennis today. I'm No. 6 in the world, I think? Which is so good to me. And I'm excited to keep working...I just want to keep winning titles like this if I can.

"It was an unbelievable match in all the ways. I mean, we played a great level of tennis. The people were excited on every single point. Roger and me were nervous during the whole match, and we felt that on court...Unfortunately I couldn't stay calm in the tie-break of the second set, but then the calms come again in the end of the match and I played good in the tie-break [in the third set]," he said.

"It [missing match point in the second set] was horrible moment for me. I was still thinking about my forehand miss and my forehand error, mistake in the match point. And, I mean, it's my shot, you know, my forehand from that side of the court. I never miss that forehand," Del Potro added while smiling.

Meanwhile, Federer congratulated the 29-year-old but was left "frustrated" after passing his opportunities by. He said he has no idea "what the hell happened" during the tie-breaker in the final set where he notably hit two double-faults.

"I lost my serve a little bit, and then he was clean and I wasn't," Federer explained. "And then it goes very quickly in the breaker. As close as it can be sometimes when you're not feeling it or momentum has shifted, it's just crazy how it can go the other way. But I had already missed my opportunities then, but I still, standing at the trophy ceremony, I think I would like to play that tie-break again, because I don't know what the hell happened. But it's OK. It happens sometimes."

The Swiss legend will remain world No. 1 in the rankings but will lose 400 points after finishing as a runner-up.