Pirates reliever Salomon Torres's wild pitch scored the go-ahead run in the 10th inning, and Aramis Ramirez's two-run homer helped the Chicago Cubs to a 5-4 victory last night in Pittsburgh.

The Cubs couldn't hold a 4-1 lead, with the Pirates tying it in the ninth on Jack Wilson's RBI single, but rallied to win their 10th in 13 games and remain a half-game behind San Francisco in the NL wild-card race.

"This is why I came over here, to be in a pennant race . . . that's what makes coming to the ballpark fun," Ramirez said.

Corey Patterson doubled to start the 10th against Torres (7-6), who came on after the Pirates tied it. After a sacrifice bunt and an intentional walk, Torres struck out Moises Alou for the second out, but his first pitch to Derrek Lee skidded off the dirt and past catcher Jason Kendall to score Patterson.

* PADRES 9, DODGERS 4: Ramon Vazquez and Ramon Hernandez each hit a three-run homer for host San Diego, and Adam Eaton beat Los Angeles for the fourth time this season to cut the Dodgers' West lead to 11/2 games over San Francisco.

Adrian Beltre hit a pair of two-run homers for the Dodgers, who have their smallest lead since July 17, when they also led the Giants by 11/2 games. Beltre leads the majors with 47 homers.

The Padres are within 51/2 games of the Dodgers, but still four games behind the Giants in the wild-card race.

* GIANTS 9, ASTROS 2: Pedro Feliz matched his career high with four RBI, and Brett Tomko won his sixth straight decision as San Francisco won at home and snapped Houston's four-game winning streak.

Barry Bonds, who had two days to rest after being held out of the lineup Sunday and getting a team day off Monday, drove in a run to help the Giants win for the eighth time in nine games, but also got plunked in the right shin by Houston's Russ Springer in the eighth.

Bonds remained at 701 homers, finishing the day 0 for 3 with his 107th intentional walk.

* BRAVES 5, REDS 4: John Thomson pitched seven innings, Julio Franco had three hits and host Atlanta reduced its magic number to win the NL East to three.

Thomson (13-8) allowed only one run and five hits to win his third straight start, also setting a season high with nine strikeouts. John Smoltz finished for his 40th save, the 150th of his career.

* EXPOS 6, METS 1: Tony Batista homered twice to reach 30 this season, Livan Hernandez pitched another complete game and Montreal won before just 3,839 at Olympic Stadium.

Hernandez (11-14) allowed six hits, including Mike Piazza's 20th homer, in his major league-leading ninth complete game.

* PHILLIES 4, MARLINS 2: Cory Lidle took a no-hitter into the seventh inning, Ryan Madson escaped a jam, and Philadelphia ended two years of frustration in Florida.

The Phillies had lost 14 consecutive games in Miami, including seven this season.

Lidle (10-12) departed after giving up three hits in the seventh, all infield singles, then hitting a batter and walking in a run.

* BREWERS 6, CARDINALS 4: Victor Santos (11-11) won for the second time in 12 starts since July 16 and rookie Dave Krynzel scored three runs to lead Milwaukee at home and stop a seven-game losing streak.

* DIAMONDBACKS-ROCKIES, PPD.: The game in Denver was postponed because of rain and will be made up as part of a doubleheader tomorrow.