MIAMI -- San Francisco Giants closer Santiago Casilla took the mound in the ninth inning with a two-run lead, and was heading for the dugout after just 11 pitches.
They weren't good ones.
"He was really off," manager Bruce Bochy said.
Consecutive singles and Justin Bour's three-run homer with no outs in the ninth gave the Miami Marlins a 6-5 victory over Casilla and the Giants.
The Giants lost even though they out-hit Miami 14-8 and tied a franchise record by turning five double plays.
"We played great, did a lot of good things, come back to take the lead, and unfortunately, it's baseball," Bochy said. "The closer was off tonight, and that's the difference in the game."
The Marlins' comeback cost Florida native Chris Heston his ninth victory. Heston, pitching before more than 20 friends and relatives, went six innings for the Giants and allowed three runs, all in the third.
"This is the first time I've been to Florida in the summer in a while," Heston said. "To get to come home and see the family, it was real special."
Casilla (4-2) entered the game with a 5-3 lead and blew a save for the fourth time in 24 chances. Christian Yelich led off with a single, Adeiny Hechavarria singled, and Bour pulled a 1-0 sinker over the fence in right field.
"I'm always confident when he throws his sinker," Giants catcher Andrew Susac said. "That one just happened to run back over the plate."
Casilla didn't talk to reporters after the game.
Bour was greeted by a cluster of teammates and doused with a sports drink as he crossed home plate.
"My jersey is soaked and might be ruined," he said. "But I'd do it again tomorrow."
The Giants had been 38-2 when leading after seven innings. Now they must try to avoid a three-game sweep Thursday when they face Marlins ace Jose Fernandez, returning from a layoff of more than a year following Tommy John surgery.
Miami squandered a 3-1 lead and committed a season-high three errors, which led to two unearned runs.
"We were a little sloppy defensively, which is uncharacteristic for this ballclub," manager Dan Jennings said. "But you can throw it out the window."
San Francisco's five double plays matched the team record for a nine-inning game, achieved six other times. Shortstop Brandon Crawford homered and had a hand in all five DPs.
Miami starter Dan Haren allowed 10 hits and four runs, three earned, in 5 2-3 innings. He fared better at the plate, crossing up the Giants in the Marlins' three-run third inning when he faked a bunt on a 2-2 pitch and instead swung and singled past the first baseman to drive in a run.
With the defense charging, Haren made the decision to swing rather than bunt, Jennings said.
"He read it," Jennings said. "That's the crafty veteran he is."