Barry Bonds set a major league record by reaching 30 home runs for the 13th straight season, but Rob Mackowiak's RBI double with two outs in the ninth gave the Pirates an 8-7 victory over the San Francisco Giants last night in Pittsburgh.

After Jack Wilson singled in the ninth off reliever Matt Herges (4-5), Mackowiak's drive off the right field wall was fielded by Michael Tucker. But Wilson beat Ray Durham's relay throw to the plate.

Tucker hit his second home run of the game and 12th of the season off reliever Jose Mesa with two outs in the top of the ninth to tie it at 7.

Mesa (3-1) earned the win despite blowing a save, and the Pirates won their third straight.

Tucker also hit a solo homer in the second inning off starter Josh Fogg.

Bonds's leadoff homer to right on a 3-2 pitch from reliever John Grabow in the seventh inning tied the score at 4 and made Bonds just the second player to hit 30 homers 14 times. Only Hank Aaron (15) has more.

"He's possibly the best player that ever played," Wilson said of Bonds. "He's got that perfect home run swing, and you don't get surprised by anything that guy does."

Jimmie Foxx is the only other player with 12 consecutive 30-homer seasons, accomplishing the feat from 1929 to '40.

Bonds also became the seventh player in major league history to reach base 5,000 times when he walked in the first inning.

* CARDINALS 2, MARLINS 1: Two hits were all St. Louis needed to beat host Florida.

Albert Pujols ended Josh Beckett's no-hit bid with a home run in the sixth, and Jim Edmonds homered on the first pitch in the 10th to help St. Louis earn its sixth consecutive victory.

The homers were the only hits for the Cardinals, who won for the 19th time in 24 games since the all-star break. They improved to 37-17 on the road, best in the major leagues.

"We've won some unusual games this year, and I'd put this one right up there with them," Manager Tony La Russa said. "Truth is stranger than fiction. You couldn't write that. They wouldn't believe it."

* PADRES 8, CUBS 6: Ramon Hernandez had three hits, including a three-run homer, and San Diego took advantage of a wild Mark Prior in Chicago. The Padres moved within one game of the Cubs for the lead in the NL wild-card race, loading the bases three times and driving out Prior in the fourth inning.

* BREWERS 3, BRAVES 2: Chris Magruder homered to lead off the 10th, sending Milwaukee to victory in Atlanta.

The Brewers rallied from two runs down to snap the Braves' five-game winning streak. It was just their third loss in the past 17 games.

Tom Martin (0-2) came on to pitch for Atlanta in the 10th, and Magruder, who entered as part of a double switch in the ninth, hit a 2-1 pitch into the seats in left for his first NL home run. He had seven in parts of three seasons in the American League.

Jon Adams (2-1) pitched out of a two-on jam in the ninth for the win, and Dan Kolb earned his 32nd save in 34 chances.

* ROCKIES 5, PHILLIES 4: Pinch hitter Vinny Castilla delivered a go-ahead, two-run double in the ninth to lead Colorado over host Philadelphia.

"It's nice to have a guy that can take a big swing and make something happen," Rockies Manager Clint Hurdle said.

* DODGERS 5, REDS 2: Steve Finley hit his first home run with Los Angeles and Jose Lima pitched eight sharp innings in Cincinnati.

Lima (11-3) allowed five hits, struck out four and walked none. Adrian Beltre also homered for the Dodgers, and Eric Gagne got three straight outs for his 34th save in 35 chances.

"It's fair to say he's exceeded our expectations," Dodgers Manager Jim Tracy said of Lima.

* EXPOS 4, DIAMONDBACKS 0: In Montreal, Livan Hernandez and Luis Ayala combined on the Expos' ninth shutout of the season in sending Arizona to its fifth straight loss.

Hernandez (9-10) struck out eight in eight innings, allowing seven hits and two walks. Ayala pitched a one-hit ninth as Montreal won its third straight.

Randy Johnson (11-10) hasn't won consecutive games since winning six straight from May 18 to June 13 and is 1-4 in his last seven starts.

* METS 7, ASTROS 3: Rookie David Wright singled home the go-ahead run and later hit his first Shea Stadium homer, sending New York past Houston.

In a matchup of fading teams in danger of dropping from wild-card contention, the Mets ended a three-game losing streak and handed Houston its fifth loss in six games.

The Giants' Barry Bonds homers in 7th and sets a major league record by hitting 30 home runs for the 13th straight season in the Pirates' 8-7 victory.