MIAMI -- In a game between struggling starters and offenses, the Miami Marlins came out on top.
"We've been waiting for those base hits and tonight we were fortunate enough to get a couple of them," Marlins manager Mike Redmond said. "It was nice to see."
Sanabia (3-6), who had lost each of his past five starts, allowed one run and seven hits over 6 1/3 innings to get his first win since April 16.
"It's been a while, a few outings since I had one," Sanabia said. "It felt great to get one."
Miami had 11 hits and struck out 13 times on its way to scoring more than three runs for just the second time in 13 games. The Marlins have won two straight after dropping seven in a row and 10 of 11.
Miami improved to 4-5 against Philadelphia, including wins in the last three matchups. The Marlins are 9-27 against everyone else.
"They can handle different teams better than others," Phillies manager Charlie Manuel said. "They've got a young team and they scrap and claw. They might not score a lot of runs, but they get their cuts in and against us they score. They score enough to beat us at times."
"We definitely have to score more runs to have a winning team," Manuel said. "Hopefully we can keep staying at it and we will, but right now it's tough. We take a step forward and two steps back."
Sanabia and Hamels entered tied with Cubs right-hander Edwin Jackson for the NL lead in losses, but both pitched well.
Hamels, the 2008 World Series and NLCS MVP, gave up two runs and seven hits without a walk. The left-hander allowed three singles in the first inning and they resulted in a run when Marcell Ozuna drove in Adeiny Hechavarria for an early Marlins lead.
Brown homered to right in the second, his eighth of the season. But that was the only run for the Phillies.
"It's definitely frustrating because I know we have the talent and the ability," Brown said. "The numbers speak for themselves in the past. It's May, it's time to get going as a team."
Hamels, who signed a $144 million, six-year contract last July, settled down after the first and fanned seven of 10 batters during one stretch. But the Phillies dropped to 1-9 when he starts after going 21-10 last season.
Hamels did not speak to reporters after the game.
"You know it's tough on him, it's got to be," Brown said. "He probably won't say it's tough on him, but I would say it definitely is."
Hamels gave up a leadoff single to Placido Polanco in the sixth and a two-out RBI double to Ruggiano that snapped an 0-for-18 slump and put the Marlins ahead 2-1.
"I haven't been keeping track of what I've not been doing this past week. I just know it hasn't been good," Ruggiano said. "It snowballs on you. ... It was nice to come out and get that monkey off my back and get some hits and some RBIs and win games."
Chris Coghlan had two hits, including a triple, for the Marlins. He also made a diving catch in left field to take a hit away from Brown in the sixth with two runners on to end the inning.
"That's the difference between today's game and (Sunday's) game: We would get a few breaks, and today they caught balls that we hit," Manuel said. "It's hard to explain."
"We had a good chance when Nix pinch hit in the seventh, but we couldn't tie the game up," Manuel said. "That might have made all of the difference in the world."
Chase Utley was caught stealing to end the eighth.
Miami tacked on three runs in the bottom half. Ruggiano had an RBI single off Phillippe Aumont to score Polanco. Two batters later, Green blooped a two-run single to shallow center that Ben Revere couldn't come up with, making it 5-1.
Chad Qualls struck out two in a hitless ninth.
NOTES: Hamels is 2-2 with a 1.80 ERA in five starts at Marlins Park. ... Hechavarria stole the first base of his career in the first inning. ... Miami placed OF Matt Diaz on the 15-day disabled list, retroactive to May 19, with a bruised left knee and selected OF Jordan Brown from Triple-A New Orleans. ... Miami rookie RHP Jose Fernandez (2-2, 3.48 ERA) will face Philadelphia for the third time on Tuesday. He has tossed 13 scoreless innings with 14 strikeouts in the first two meetings. The Phillies counter with RHP Tyler Cloyd (0-0, 2.84).