Updated

Josh Johnson shook off a five-game winless streak to again be the effective pitcher he was earlier in the season, withstanding two solo home runs over eight innings to lead the Florida Marlins past the Pittsburgh Pirates 3-2 on Wednesday night.

Dan Uggla hit his 28th homer and Cody Ross and Ronny Paulino each doubled and scored to support Johnson (11-5), who hadn't won since July 17. Johnson was coming off his worst start in three years, giving up six runs and 10 hits in 3 2-3 innings during a 7-2 loss to Cincinnati on Friday.

Ryan Doumit homered in the second, a 445-foot drove that was only his second since June 29, and Andrew McCutchen hit his 11th with two out in the eighth, but the Pirates still dropped their ninth in 10 games. With a 40-80 record, they are two losses away from a record-extending 18th consecutive losing season.

Johnson's ERA climbed from 1.61 to 2.27 during his winless streak, but the Pirates mostly saw the pitcher that the Marlins felt just a month ago might win the Cy Young Award. He struck out six, walked none and gave up seven hits.

Before starting his slide, Johnson was 10-3 with a 1.61 ERA, and he had an 0.75 ERA in his previous 12 games. After that, he had a 4.98 ERA while losing twice and failing to get the decision three other times.

Johnson's best pitching may have been in the fourth, when the Pirates couldn't score even after right fielder Mike Stanton dropped the easiest of fly balls.

Garrett Jones' soft fly ball fell into Stanton's glove but somehow dropped out, putting Jones on second with no outs — exactly why every Little League coach tells his players to run out every ball. Jones advanced to third on a grounder, but Johnson ended the threat by getting Delwyn Young to ground out.

The Marlins took a 2-1 lead in the fifth as Ross doubled and scored on Chad Tracy's single off Ross Ohlendorf (1-10), who again got little support. Florida added a run in the eighth on Paulino's leadoff double, Johnson's sacrifice bunt and Hanley Ramirez's sacrifice fly.

Leo Nunez pitched the ninth for his 27th save in 34 opportunities, retiring three straight after walking leadoff batter Jones.

Ohlendorf, who gets a major league-low average of 2.1 runs of support per game, permitted only four hits over eight innings, but all four led to runs. He hasn't received more than three runs of support while on the mound in any of the 20 games he's pitched, and he's won only once despite having a 2.34 ERA over his last 10 starts.

NOTES: Pirates SS Ronny Cedeno (left shoulder) was scratched for the second straight day. ... The Pirates' .333 winning percentage is the majors' lowest. They must go 23-19 over their final 42 games to avoid their first 100-loss season since 2001. ... Florida won for the second straight night after losing four straight. ... Doumit's homer bounced to a man walking two dogs along the Allegheny River. ... Uggla's leadoff homer in the second was his 12th in 24 games.