MIAMI -- The Florida Marlins fell behind early and blew a lead late. Their pitchers kept loading the bases, and their hitters struggled against a rookie with a 9.26 ERA.
Yet Florida won.
It helped to play woeful Pittsburgh. But the Marlins' 5-4 victory Sunday also offered a gauge of their progress this year.
"We're flying high and we're confident," said Dontrelle Willis, proud to keep the game close for six innings with less than his best stuff. "Games like this early in the season would have been 8-0."
Florida, once 5-13 in one-run games, improved to 11-19 in that category.
"We're showing resilience like a veteran ballclub, like a St. Louis or New York," Willis said.
The young Marlins lost 13 of their first 15 home games this season, but they're now above .500 in Miami for the first time at 25-24.
"We're getting better," shortstop Hanley Ramirez said. "And we're going to get better."
Alfredo Amezaga walked to start the rally in the ninth against Mike Gonzalez (3-4) and advanced on Ramirez's sacrifice. Uggla followed with a single to center, and Amezaga easily beat Jose Bautista's throw home.
"That's the best situation you can ask for -- a chance to win the game," Uggla said. He also hit his 14th homer, his first since June 20.
Willis needed 111 pitches to get through six innings, allowing eight hits and three runs. He twice pitched out of bases-loaded jams.
"What it really boils down to is our missed opportunities in the early part of the game," Pirates manager Jim Tracy said. "We put ourselves in a position where you're living on the edge for the rest of the ballgame."
Pirates rookie Tom Gorzelanny, seeking his first major league win, lowered his ERA to 7.13 by pitching six innings and leaving ahead 3-2. The lead lasted four pitches -- Jeremy Hermida hit his fourth homer against Matt Capps to start the seventh.
Joe Borchard followed with a triple and scored on Ramirez's safety squeeze, sliding to beat the throw home by Capps for a 4-3 Florida lead.
The Pirates missed a chance to take the lead in the ninth. Jack Wilson singled off Borowski, Jason Bay walked and Joe Randa drove in the tying run with a two-out double.
But Borowski (1-2) struck out Jose Hernandez with the bases loaded to end the inning. The Pirates went 1-for-7 with the bases full and stranded 12.
Pittsburgh remained the NL's worst team, with 35 wins after 100 games. The Marlins won the final three games of the series and finished 7-4 on their homestand.
"Winning today made it a good homestand," Florida manager Joe Girardi said. "We hope to keep it rolling."
Willis needed 18 pitches to retire a batter. He loaded the bases in the first by giving up two scratch singles sandwiched around a walk, then struck out three right-handed hitters - Bay, Randa and Craig Wilson.
"It definitely could have turned into an eight-run inning," Willis said. "You've got to battle. Every day isn't clear skies. And I like to battle. I enjoy the fight."
Pittsburgh scored three times in the third. Bautista led off with a single, went to second when Willis made an errant pickoff throw and scored on a single by Jack Wilson, who extended his hitting streak to 10 games.
The hit ended a four-game stretch during which the Pirates went 0-for-12 with runners in scoring position.
Freddy Sanchez and Randa also singled to load the bases, and with two outs, Hernandez lined an 0-2 pitch for a two-run single and a 3-1 lead.
But the Pirates left the bases loaded again in the fourth. Randa flied out to end the inning.
"It's always frustrating when you leave people on base," Bautista said.
- Willis is 2-4 with a 6.00 ERA at home. On the road he's 4-3 with a 2.49 ERA.
- Borowski blew a save opportunity for the third time in 23 chances.
- The Marlins won the season series 5-2.