© Getty Images
The pair traded four holds of serve in the opener before Nadal edged ahead 3-2 when Wawrinka double-faulted at 30-40.
Nadal would serve for the set at 5-4 but couldn't come through as Wawrinka broke back before a couple more holds made a tie-break necessary to decide the set.
In the breaker, Nadal defended some powerful Wawrinka hitting at 5-5 to open up a set point, which he took in fortuitous circumstances as Wawrinka slipped when about to make an easy volley at the net, popping the ball up for Nadal to curl in an easy pass.
That was Nadal's 25th successive set won against the Swiss.
In the second set, as in the first, the opening few games went with serve until Nadal broke and then took a 4-1 lead.
Wawrinka responded and broke at the next time of asking to claw it back on serve and soon the pair were again in a tie-break.
Nadal opened up two mini-breaks early on to go 4-1 up but then Wawrinka's flashy winners helped him win four points in a row to go 5-4 in front.
The Swiss failed to convert a set point with Nadal serving and the Spaniard made him pay by clinching the breaker 8-6 when Wawrinka netted a backhand.
Nadal faces Tomas Berdych in his final round robin match, while Wawrinka, who still has a chance to qualify for the semi-finals, takes on David Ferrer.