SAN FRANCISCO - Livan Hernandez pitched a seven-hitter to win for the 12th time in 14 decisions at Pacific Bell Park, and the San Francisco Giants beat the Cincinnati Reds 7-3 Tuesday night.
Cincinnati's loss ensured St. Louis, the NL Central leader, would finish no worse than tied for the division title.
Ken Griffey Jr., who had missed seven games with a partially torn left hamstring, hit his 40th homer in the eighth when he pinch hit, making him the fourth player to reach 40 in seven seasons. Babe Ruth did it 11 times, and Hank Aaron and Harmon Killebrew eight each.
San Francisco, which lowered its magic number to three for the NL West title, opened a season-high 10-game lead over second-place Arizona.
Hernandez (16-10) got his 16th career complete game, his fifth this season - striking out three and walking none to stop Cincinnati's four-game winning streak.
He also hit a run-scoring single in the sixth, giving him hits in 14 of his last 20 outings. He is hitting .247 (21-for-85) this season with nine RBIs.
Reds rookie Rob Bell (7-8) allowed four runs and seven hits in five innings for the Reds. He struck out four.
Chris Sexton's RBI single up the middle put the Reds in the second inning. Giants catcher Bobby Estalella, attempting to tag Casey out at home, argued the runner never touched the plate but plate umpire Mark Hirschbeck called Casey safe.
Casey left the game after the inning with tightness in his right hamstring.
Estalella doubled in the third, beating a throw by right fielder Alex Ochoa, took third on Hernandez's grounder, and scored on Marvin Benard's double.
Benard scored on Bill Mueller's single, and Mueller scored on Barry Bonds' double for a 3-1 lead.
Jeff Kent's RBI double in the fifth inning scored Bonds, who walked. Estalella added a run-scoring triple in the sixth inning, and Hernandez hit his run scoring single.
Rich Aurilia added an RBI single in the seventh inning. Notes:
Tony Bennett crooned ''I Left My Heart in San Francisco'' for the crowd before the game. ... The Reds have played in front of 33 sellout crowds, but just three at home. The rest have come on the road, including Tuesday night's game. ... Barry Bonds needs one home run to tie Lou Gehrig for 17th on the career list with 493. ... Bonds has hit 40 or more home runs in four different seasons with the Giants. Willie Mays hold the record with 40 or more homers in six different seasons. ... Giants prospect Kurt Ainsworth limited the Netherlands to one run in 6 2-3 innings as the United States won 6-2 at Olympics on Tuesday.