Late night shocker for Rafael Nadal in Rio

He will meet Nadal’s fellow Spaniard David Ferrer in Sunday’s final.

Nadal, whose 2014 was disrupted by injury and illness after winning a record ninth French Open title, has struggled since his return to action, losing in the first round in Qatar and the quarterfinals of the Australian Open.

But returning to clay in Brazil, the world number three was a firm favorite to repeat his success of last year and had a winning 4-0 record over Fognini going into their last four encounter.

It was her 10th career title and will lift Halep to third in the world rankings behind Serena Williams and Maria Sharapova.

Halep eventually prevailed after a marathon second set lasting over an hour, wasting two match points as she served for the match at 5-4 and 6-5 before edging the tiebreaker.

CNN