The match between Ferrero, winner of 21 out of 22 claycourt encounters this year, and Federer, who has only lost one set in nine matches on clay in 2003, had been eagerly awaited.
Number two seed Ferrero was serving to level the second set at 3-3 when Federer approached the umpire to question a late line call.
That proved the cue for Gabriele Paolini -- known as the prophylactic prophet -- to leap from his seat at the side of the court and throw condoms at the players.
Paolini has disrupted other events using the same tactic as he tries to publicise the use of condoms after one of his friends died of AIDS.
After several minutes security guards led Paolini from the court amid chants from the crowd of "imbecile", but Ferrero's concentration was broken and Federer won the next two points to break serve for a 4-2 lead.
In the following game Ferrero threw in the towel, citing an inflammation of his shoulder.