And neither wants to finish last in the NL West.
Eric Byrnes hit a two-run homer and drove in three runs and the Diamondbacks ended their 2006 road campaign with a 6-3 victory over the Giants on Wednesday.
"These days are always fun," Byrnes said. "These games are important for us. If we can't be a factor in the postseason, we might as well be a factor during the season."
Claudio Vargas (12-10) struck out six in 6 2/3 strong innings to end a three-start winless stretch, beating the Giants for the first time in three tries this season.
"That's the best I started all year," Vargas said. "Staying on one roll, that makes it easy."
Orlando Hudson, who returned to Arizona's lineup for the first time since leaving the team before Sunday's game to tend to family matters, scored the go-ahead run on a wild pitch in the sixth. Byrnes also drove in the tying run that inning.
Eliezer Alfonzo hit a two-run homer for the Giants that tied it at 2 in the second after Byrnes connected for his 25th homer in the first.
Moises Alou, who hit the winning home run Tuesday night in San Francisco's 4-2 victory, had a leadoff double in the fourth and later stole home on a double steal to give the Giants a 3-2 lead before Arizona rallied in the sixth.
"It was fun," he said. "A good throw probably would have gotten me at the plate. I'm glad it worked out for us."
The Diamondbacks now return home to finish the season with four games against the San Diego Padres starting Thursday -- and the atmosphere is expected to be emotional as Luis Gonzalez plays his final home games in Phoenix.
Manager Bob Melvin gave Gonzalez a day off Wednesday heading into the weekend. The popular left fielder was told earlier this month by the team that it would not bring him back next season. He's played for Arizona in eight seasons of the club's nine-year existence.
Gonzalez delivered the winning hit in Game 7 of the 2001 World Series as Arizona stunned the New York Yankees. Gonzalez, hitless in four at-bats Tuesday night, is batting .271 with 15 home runs and 73 RBI this year.
"The treatment from the fans will be the most important thing," Melvin said. "He has always been there for his teammates. Those are big games for the Padres. We can't lose sight of that, and we won't."
Fans chanted "Barry! Barry!" in the seventh but Mark Sweeney and then Todd Linden emerged from the dugout to pinch-hit instead of slugger Barry Bonds, who sat out a second straight game to nurse his tender left elbow. Bonds planned to play in some capacity during a weekend series with the rival Los Angeles Dodgers, and is scheduled to have surgery to clean out his elbow after the season.
Jonathan Sanchez (3-1), coming off three straight no-decisions, allowed five hits and four runs in six innings, struck out two and walked one to end his rookie season on a strong note.
"I went up there with my mind on throwing strikes and hitting my spots, and that's what I did," said Sanchez, who hopes to be in the 2007 rotation.
Giants manager Felipe Alou rested several regulars Wednesday but expected to use a typical lineup to play the Dodgers starting Friday.
- Alfonzo homered for the first time since Aug. 30 at Atlanta, a span of 58 at-bats. "I don't remember the last one," he said.
- Arizona went 37-44 on the road this year.
- The D'Backs, who already had lost the season series with San Francisco for a fifth straight year, finished 8-11 against the Giants.
- D'Backs 3B Chad Tracy, nursing mild tendinitis in his left knee, had the day off.
- Alou's steal of home was the 33rd for the Giants since the team moved West to San Francisco in 1958. The 40-year-old Alou is the oldest major league player to do it since Paul Molitor in 1998 when he was 41 years, 270 days. "It feels special to still be around at age 40," Alou said. "Making nice plays in the field and stealing home plate."
- The Giants drew 34,503 fans to go over the 3 million mark for the seventh straight year -- every season the team's waterfront ballpark has been open.