Ricco, who was ninth overall two minutes and 29 seconds behind leader Cadel Evans of Australia, consequently lost the polka-dot jersey for the race's best climber.
That jersey went to German Sebastian Lang while Italian Vincenzo Nibali took the white jersey for the best young rider after the 168.5-km 12th stage, won by Britain's Mark Cavendish.
He won a mass sprint ahead of France's Sebastien Chavanel and Belgian Geert Steegmans.
Image: Team Gerolsteiner's Sebastian Lang of Germany pulls on the polka dot mountains jersey after stage twelve.