No. 2 seed Novak Djokovic set up a semifinal meeting with Canada’s Milos Raonic at the Rome Masters after ousting Spain’s David Ferrer 7-5, 4-6, 6-3 on Friday.

After dominating a hard-fought opening set, the Serbian was outplayed in the second and had to overcome a few wobbles on his way to wrapping up the match in two hours and 31 minutes.

Leading 3-1 in the deciding set, Djokovic allowed his Spanish rival to break back to 3-3 before serving to take a 4-3 lead. Despite some resistance from Ferrer in a thrilling eighth game, Djokovic broke back when he sent a powerful drive past the Spaniard and into the corner to take a 5-3 lead.

Ferrer was equally defiant in the final game, but after saving two break points the Spaniard capitulated when he netted what looked like an easy return.

Earlier, Raonic claimed his last-four spot with a commanding 6-3, 5-7, 6-2 quarterfinal win over Frenchman Jeremy Chardy.

Chardy had eliminated Swiss fourth seed Roger Federer on Wednesday 1-6, 6-3, 7-6(6). But after seeing the unseeded Frenchman fighting back to level by winning a close second set, Raonic regained control of the match in a largely one-sided third set to advance.

Germany’s Tommy Haas, seeded 15, retired after losing the first set 6-2 against Bulgarian Grigor Dimitrov.

Haas lasted just 35 minutes before informing officials he could no longer carry on and shaking Dimitrov’s hand before leaving the Central Court at the Foro Italico.

Errani ousts Li Na

Meanwhile, Italy’s No. 10 seed Sara Errani, meanwhile, benefited from huge crowd support as she stunned China’s No. 2 seed Li Na 6-3, 4-6, 6-2.

Errani has now made the semifinals for the second consecutive year, keeping her on course to become the first Italian woman since Raffaella Reggi 29 years ago to win the tournament when it was held in Taranto.

The Italian will meet the winner of the quarter-final between Jelena Jankovic of Serbia, seeded six, and Agnieszka Radwanska of Poland, who is the third seed.

Errani was joined in the last four by Ana Ivanovic, although the Serbian 11th seed had to dig deep throughout a thrilling encounter with Carla Suarez Navarro before finally beating the Spaniard, seeded 13, 6-4, 3-6, 6-4.

Ivanovic will now meet either defending champion and top seed Serena Williams of the United States or China's Zhang Shuai.

The results: ATP Rome Masters: Quarterfinals: Novak Djokovic bt David Ferrer 7-5, 4-6, 6-3.

Grigor Dimitrov bt Tommy Haas 6-2 (retd.); Milos Raonic bt Jeremy Chardy 6-3, 5-7, 6-2. Third round: Djokovic bt Philipp Kohlschreiber 4-6, 6-2, 6-1.

WTA Italian Open: Quarterfinals: Ana Ivanovic bt Carla Suarez Navarro 6-4, 3-6, 6-4.

Sara Errani bt Li Na 6-3, 4-6, 6-2. Third round: Serena Williams bt Varvara Lepchenko 6-1, 6-2.

More In: Tennis | Sport