Derek Dietrich's first career home run was a three-run blast that helped the Miami Marlins get by the struggling Los Angeles Dodgers, 5-4, in the opener of a three-game series.
Juan Pierre had two hits and drove in the go-ahead run for the Marlins, who had just been swept by the Padres and dropped six of eight games coming in.
Jose Fernandez (2-2) shook off a shaky start and lasted six innings. The 20- year-old righty gave up three runs and eight hits and struck out seven to earn his second straight victory.
"We're starting to see improvement as a team, and that is good to see," Pierre said.
Adrian Gonzalez smacked a three-run homer and A.J. Ellis went 3-for-4 with an RBI, but it wasn't enough to stop the Dodgers' seven-game slide.
Los Angeles sent its own rookie starter to the mound in Matt Magill, who allowed three runs on three hits and walked four over five innings.
"It is tough, I hate losing and hate playing bad, but you just have to try to get better every day and move on," Magill said.
Placido Polanco and Marcell Ozuna each earned free passes in the fourth inning before Dietrich, playing in his second career game, stepped in with two outs and sent a payoff pitch into the right-field seats to tie the game.
Gonzalez had given the Dodgers an early 3-0 lead in the first inning after he followed Carl Crawford's single and Nick Punto's walk with a shot over the center-field wall for his fourth home run of the season.
Fernandez settled down from there and induced a routine flyout off the bat of pinch-hitter Tim Federowicz to leave the bases loaded in the sixth.
Miami took its first lead in the seventh off Ronald Belisario (2-4) thanks to three straight hits. Juan Pierre plated Rob Brantly with a single to left, and Chris Coghlan scored on Adeiny Hechavarria double-play grounder.
The Dodgers pushed a run across in the eighth on Ellis' RBI single, but Chad Qualls stranded Ellis on third to keep the Marlins in front.
Steve Cishek retired the side in order in the ninth to post his fifth save of the season.
Crawford had three hits for the Dodgers, who stranded seven runners and struck out 10 times ... The Marlins will start Kevin Slowey on Saturday opposite left-hander Hyun-Jin Ryu.