© PA Photos
After seven games without a break point in the opening set, Federer pressured the Argentinian's serve in the eighth but was unable to make any of the three break points he earned count.
Soon the pair were into a tie-break and it was Del Potro who raced into a 6-1 lead before closing out the opener in 53 minutes.
Federer wasn't to be deterred and the Swiss broke serve to-love at the start of the second before completing eight points in a row to consolidate the break.
The remainder of the set went with serve to ensure Federer gained a 6-4 success to send the match into a deciding third.
In the decider it was Del Potro who broke at the first time of asking before remaining firm on his service to come through 6-3.
Both men are through to the semi-finals because of the result but it is uncertan who they will take on. If David Ferrer beats Janko Tipsarevic this evening then Federer will top the group and face Andy Murray in the semi-finals but if Tipsarevic is victorious then Federer will take on Djokovic in the last four.