MIAMI -- The Pittsburgh Pirates apparently figured out how to win close games over the All-Star break.
Jeromy Burnitz's single through a drawn-in infield drove in the tie-breaking run in the ninth inning of a 5-3 victory over the Florida Marlins on Thursday, improving the Pirates' record since the break to 5-2.
The Pirates are 4-0 in games decided by two runs or less since the break after going 15-32 in the first half of the season.
"We've been in a lot of situations where we've had leads and not held them, or come back but not far enough," Pirates All-Star outfielder Jason Bay said. "Now we've been holding those leads. It's a lot easier to do that when you get into a rhythm and have a little fun."
Jose Bautista walked on four pitches to lead off the ninth and advanced to second on a sacrifice bunt. He moved to third on a wild pitch and scored on Burnitz's groundball hit between first and second. Jack Wilson added an insurance run with a two-out double.
"I don't think it's a reach to say we were in this situation the entire first half," Pirates manager Jim Tracy said. "Now you see a better understanding of those type of situations."
Gonzalez allowed a walk and a single after striking out the first two batters, but struck out Alfredo Amezaga to end the game.
"That's the one thing I didn't want to do was throw a lot of pitches, and I ended up doing that," Gonzalez said. "That's just one of those things that I've got to learn, after you get two quick outs, go out there and try to get a groundball. Stop trying to strike the guy out."
Randy Messenger (1-6) allowed two runs, two hits and two walks, only getting two outs in the ninth.
Pirates rookie Nate McLouth tied the game at 3 when he led off eighth inning with his fifth homer. He had struck out with the bases loaded and one out in the fifth inning when the Pirates had a chance to break a 2-2 tie.
"To kind of atone for that and tie the game up late was definitely gratifying for myself," McLouth said, "but it's also a big win."
Bay hit a two-run homer, his 22nd, for the Pirates in the fourth.
Mike Jacobs homered for Florida, while Dan Uggla had an RBI triple and Hanley Ramirez added an RBI double.
Florida starter Josh Johnson, who shared NL Rookie of the Month honors for June with Uggla, allowed two runs and four hits in seven innings and left with a 3-2 lead.
"He had a great outing," Florida manager Joe Girardi said. "That's what J.J. does. J.J. holds teams down. He does a lot of things right and he did (them) tonight. Two runs in seven innings, that's a great outing for our young starters."
Pirates starter Ian Snell gave up three runs and six hits in six innings. He had been shelled for seven runs in 1 1/3 innings in his only other start against Florida this season.
"I held a grudge against them since that little game we had in Pittsburgh," Snell said. "I just didn't fall into the same routine that I fell in last time, just throwing fastballs, fastballs. I just kept mixing up my pitches and locating my pitches."
Johnson didn't allow a baserunner until the fourth when Wilson walked with one out and Bay homered one out later.
The Marlins tied it in the bottom of the inning when Jacobs led off with an opposite-field home run to left, his 14th, and took the lead in the sixth on Uggla's triple.
"It's a game we had a chance to win and just didn't get the job done," Girardi said.
- Pittsburgh 3B Freddy Sanchez, who entered the game leading the NL in batting with a .363 average, went 0-for-5 to drop to .358.
- Johnson needed only five pitches to retire the side in order in the first inning.
- Bay's home run extended his hitting streak to 12 games.