MIAMI -- Brandon Webb gave the Arizona Diamondbacks a big lift.
Troy Glaus and Chad Tracy homered in the eighth inning to support Webb and lead Arizona to a 3-1 victory over the Florida Marlins on Thursday night.
Webb (10-8) limited Florida to four hits and a walk in eight innings. He struck out seven to help the Diamondbacks avoid being swept in the three-game series.
"You talk about right on time, we needed that one big," manager Bob Melvin said.
Arizona had lost six of eight to drop four games behind in the NL West since gaining a share of the division lead on July 31.
"Every win is big for us," Glaus said. "We have 50-some games left, we have to win as many as we can. Tonight it worked out for us."
With Arizona trailing 1-0 through seven despite Webb's strong outing, Tracy tied it in the eighth with a leadoff shot off left-hander Valerio de los Santos (1-2), who left after allowing Luis Gonzalez's single.
Antonio Alfonseca relieved and got Tony Clark to ground to first as Gonzalez advanced to second. Glaus followed with a towering drive into the left-field stands. Left fielder Miguel Cabrera never budged as the 438-foot shot soared way overhead and deep into the lower-deck stands.
"I hit it far enough, that's all that matters," Glaus said.
Jose Valverde pitched the ninth for his fourth save in six opportunities.
Marlins starter Brian Moehler scattered six hits in 6 2/3 scoreless innings. He walked Kelly Stinnett with one out in the seventh and left the game after Webb sacrificed to advance Stinnett.
With pinch-runner Quinton McCracken on second, de los Santos got Craig Counsell to ground to first to end the threat.
Juan Pierre had an RBI single in the fifth for the Marlins' lone run. Chris Aguila led off the inning with a drive high off the left-field scoreboard wall for a double. One out later, Webb hit Moehler with a pitch. Pierre hit an RBI single to right to score Aguila, but Tracy's throw to third easily cut down Moehler.
"We hung in there," Moehler said. "We battled and we won the series, which is what you want. It would have been nice to get the sweep here but we took two of three, which is big, and we go play San Fran tomorrow and hopefully win that series. That's the goal, win them all from here on out."
Cabrera had an assist in the top half of the inning when catcher Matt Treanor made a swift tag on his throw to the plate to retire Stinnett, who was trying to score from second on Tracy's two-out single.
"It was a win, period," Melvin said. "You struggle like we did the last few games. Finally we get a few guys on and we don't get them in, we get a guy thrown out at the plate. You have to resist the urge to feel like you're snakebit.
A fan threw Tracy's home run ball back to the edge of the pitching mound. De los Santos grabbed the ball and quickly threw it toward a ball boy. ... Diamondbacks 2B Craig Counsell got his career-high 18th stolen base in the ninth.