PHOENIX -- In spite of themselves, the San Diego Padres are inching closer to the title in the "NL Worst."
"It's a game we probably gave away," the Padres' Brian Giles said.
But with San Francisco's 6-0 loss at Colorado, San Diego leads the second-place Giants by five games in the NL West with eight to play. Any combination of four Padres' victories or four Giants' losses will give San Diego the title.
The Giants and Padres begin a four-game series in San Diego on Monday.
Tracy was 3-for-5 with two doubles and Luis E. Gonzalez homered twice with three RBI for the Diamondbacks, who avoided elimination in the NL West. The first-place Padres dropped back to .500 at 77-77 -- the same record as the last-place New York Mets in the NL East.
The Padres lost outfielder Dave Roberts and shortstop Khalil Greene with minor injuries. Roberts strained his left quadriceps and is out seven to 10 days. Greene bruised his left shin with a foul ball and will be sidelined two or three days, manager Bruce Bochy said.
"It definitely hurt because we've got a couple of guys down now so we're not at full strength," Bochy said. "But we"ll put this behind us and come grind it out here tomorrow."
Ramon Hernandez hit a three-run homer for the Padres, who led 5-3 before Arizona's comeback.
Akinori Otsuka (2-7), the sixth of seven San Diego pitchers, allowed four runs, two hits and two walks in one-third of an inning.
Tim Worrell (1-2) pitched a perfect eighth to get the victory in his 650th major-league appearance, his first win since Sept. 25 last year. Jose Valverde pitched the ninth for his 11th save in 13 opportunities.
Arizona is 6½ behind San Diego with seven to play.
"As much as has been said about us not having any heart and all this stuff, we've been battling all year," manager Bob Melvin said. "We could have quit a while ago, but we don't. We're not the type of team that is outwardly enthusiastic, and I think it sometimes might be misconstrued for no desire or whatever, but this is a team that could have called it in quite some time ago, and we're just not going to."
Alex Cintron led off the Arizona eighth with a double, then pinch-hitter Royce Clayton and Craig Counsell drew one-out walks to load the bases. Gonzalez singled in Cintron, and left-handed specialist Chris Hammond relieved Otsuka. Tracy sent Hammond's 0-2 pitch over Damian Jackson in center to clear the bases.
"Right now we're going to play every game out and we'll see how the division ends up at the end," Tracy said. "We're not going to lay down for anybody. We're still not mathematically out of it, and miracles have happened before."
Hernandez's two-out homer off Russ Ortiz broke a 2-2 tie in the fourth. Gonzalez leaped high to try to catch the ball at the left-field wall. Replays indicated the ball bounced off the top of Gonzalez's glove over the wall. But he said afterward that he slipped into a crease in the wall and the ball skimmed over his reach off the padding and into the stands.
Arizona's Russ Ortiz escaped a bases-loaded jam in the third. But in the fourth pitcher Brian Lawrence, hitting .059 coming in, singled for the second time in as many at bats, then Dave Roberts walked. Loretta flied out, and Hernandez homered to give San Diego a 5-2 lead.
Counsell's RBI double cut it to 5-3 in the bottom half.
- Lawrence, who has five hits in 56 at-bats, raised his average to .089. He is 0-3 in his last seven starts.
- Linebrink has not allowed an earned run in his last 20 outings.
- San Diego is trying to avoid the worst record by a division champion in baseball history, 82-79 by the 1973 Mets. That doesn't count 1994 season, when a strike ended the season with Texas atop the AL West at 52-62.