MIAMI (AP) -- This time it was the Marlins who walked off with a win in the final inning.
Mike Jacobs hit a two-run single off Ryan Dempster with two outs in the ninth Tuesday night, giving Florida a 5-4 victory over the struggling Chicago Cubs and denying Kerry Wood his first win in 10 months.
Last week, the Marlins were handed four walk-off losses, three in extra innings. But they turned the tables on the Cubs.
"We can come back and win in the bottom of the ninth," Florida manager Joe Girardi said. "It can happen to someone else."
Miguel Cabrera hit a two-run homer for the Marlins, who improved to 5-14 at home before a crowd of 10,979. They have won two straight after a seven-game losing streak.
"It was a big win for us and a big hit for [Jacobs]," Girardi said. "Our bullpen gave us a chance to chip away."
Making his second start since shoulder surgery last Aug. 31, Wood struggled with his control but left with a 4-3 lead after five innings. He allowed two hits, walked five and struck out three, and even helped himself with an RBI single.
"I didn't have my best stuff but I made my pitches when I needed to," Wood said. "I made a couple of mistakes. All in all, I kept us in the game."
Dempster (0-2) entered in the ninth to protect a one-run lead, but Florida loaded the bases with one out. After Josh Willingham grounded into a force play at the plate, Jacobs hit a liner to left-center that short-hopped the fence.
"I was hoping he was going to leave something out over the plate," Jacobs said. "I was pumped. I felt like I was floating. There's no better feeling in baseball than a walk-off hit. It's exciting to leave the other team on the field."
"I didn't make a good pitch to Jacobs," Dempster said. "It was a pitch away and he went the other way with it. It was a good piece of hitting."
Logan Kensing (1-1) struck out two in a perfect ninth for the win.
Wood threw 86 pitches, 49 for strikes. He was looking for his first win since July 15, 2005, against Pittsburgh.
Scott Olsen pitched five innings for Florida, allowing four runs and six hits. He struck out six.
The Marlins closed the gap to 4-3 in the fifth on Cabrera's two-out homer to right-center off Wood, his seventh of the season.
The Cubs stretched their lead to 4-1 on Murton's third-inning homer off Olsen.
The Marlins manufactured a run in the third. Ramirez led off with a walk, stole second, advanced to third on a flyout and scored on Cabrera's sacrifice fly.
Barrett's solo homer off Olsen over the left-field scoreboard, his sixth of the season, gave the Cubs a 3-0 lead in the third.
The Cubs took a 2-0 lead in the second. Barrett led off with a triple and scored on a two-out single by Ronny Cedeno. A single by Wood scored Murton, who walked with one out.
Ramirez reached base seven consecutive times, including all five plate appearances Monday, until he lined out to second in the fifth inning. ... Olsen took the mound with a shiner under his left eye, the result of a scuffle with teammate Randy Messenger last weekend. ... Barrett has reached base in 16 of his past 21 games.