Lars Bak of Denmark won the 12th stage of the Giro d'Italia and Joaquin Rodriguez retained the overall lead on Thursday.
Bak burst away from the breakaway group with a half mile to go for a clear victory on the 96-mile route from Seravezza to Sestri Levante.
Casar finished 3:23 ahead of Rodriguez and the rest of the peloton but it was not enough to overtake Rodriguez as the overall leader. Casar is 26 seconds behind the Spaniard, who will wear the pink jersey for the third successive day on Friday.
Casar and Bak were at the front for most of the race after establishing a nine-man break along with Ivan Santaromita, Jackson Rodriguez, Jan Bakelants, Andrey Amador, Michal Golas, Amets Txurruka and Martijn Keizer.
There were fears for Michele Scarponi when the defending champion caught the wheel of his teammate and ran off the course. But he swiftly got up and his teammates worked hard to bring him back into the peloton.
Also, William Bonnet and Mats Christensen withdrew before the start of the stage.
The 13th stage is the shortest leg of the Giro, a 75-mile ride from Savona to Cervere, which is largely downhill.
The race ends on May 27 in Milan.