Kathy Willens, Associated Press
New York Yankees Jason Giambi, left, celebrates with teammates Johnny Damon, center, and Wilson Betemit after hitting a two-out walk-off, two-run home run.

NEW YORK — Pinch-hitter Jason Giambi connected for a two-run homer with two outs in the bottom of the ninth inning, rallying the New York Yankees to a 9-8 victory over the Toronto Blue Jays on Thursday.

Giambi's drive off closer B.J. Ryan into the right-field upper deck — just inside the foul pole — capped New York's biggest comeback win this season. In erasing a 7-2 deficit, the Yankees overcame another poor outing by Chien-Ming Wang and a key error by center fielder Melky Cabrera.

Brought on to protect an 8-6 lead, Ryan (1-2) got two quick outs in the ninth. But Alex Rodriguez singled, moved to second on defensive indifference and scored on Hideki Matsui's single.

Giambi, who didn't start because of a sore left foot, batted for Jose Molina and pulled an 0-2 pitch down the right-field line for his second career pinch-hit homer and fourth game-ending shot.

Kyle Farnsworth (1-2) earned the win despite allowing a run in the top of the ninth. New York handed Toronto its eighth loss in 23 games and took two of three in the series.

Matt Stairs homered and drove in five runs for the Blue Jays, but Ryan blew his second consecutive save chance after going 12-for-12 to start the season.

Yankees catcher Jorge Posada went 1-for-3 in his first start since coming off the disabled list.

American League

ORIOLES 3, TWINS 2: At Minneapolis, Adam Jones hit a tiebreaking home run in the seventh inning and Baltimore beat Minnesota. Jones opened the inning with a drive into the left-field seats against reliever Brian Bass (2-2). Nick Markakis gave the Orioles a 2-1 lead in the third with 10th homer, a two-run shot.

RED SOX 7, RAYS 1: At Boston, Manny Ramirez homered, drove in five runs and got into a shouting match with a teammate in a game that included a bench-clearing brawl between the Red Sox and Rays. TV cameras showed Ramirez and Kevin Youkilis being separated after exchanging words. The Red Sox posted their 13th straight home win, matching the majors' longest streak in nearly two years, and completed their second three-game sweep of the Rays.

RANGERS 9, INDIANS 4: At Arlington, Texas, Michael Young homered and extended his hitting streak to 21 games, and Kevin Millwood shook after a bad first inning to pitch into the seventh for Texas. The Indians roughed up Texas pitching for 35 runs and 48 hits in the first three games of the series, then scored four more in the first.

WHITE SOX 6, ROYALS 2: At Chicago, Jose Contreras won his fourth straight decision and Jim Thome homered as the resurgent White Sox beat the Royals to complete a three-game sweep. The sloppy Royals (23-37) lost their 11th straight road game, one shy of the franchise record, and have dropped 15 of 17 overall.

National League

BRAVES 7, MARLINS 5: At Atlanta, Braves slugger Chipper Jones hit his 400th career home run and finished with four hits, raising his major league-leading batting average to .418. Jones came out of the dugout for a curtain call as fans cheered his milestone homer in the sixth inning. He became the third switch-hitter to reach 400 home runs, following Hall of Famers Mickey Mantle (536) and Eddie Murray (504).

PHILLIES 5, REDS 0: At Philadelphia, Cole Hamels pitched a three-hitter for his second career shutout and the Phillies took advantage of two dropped balls to beat the Reds. Ken Griffey Jr. remained one shy of 600 home runs, going 1-for-4 in his first start in four games. Junior hit a double off the wall in left-center, grounded out twice and hit a deep drive to center field leading off the ninth.

CARDINALS 4-9, NATIONALS 1-10: At Washington, Todd Wellemeyer won his fifth straight decision, Troy Glaus hit a two-run homer and Albert Pujols the first pinch-hit homer of his career to lead St. Louis in the opener of a day-night doubleheader. In the second game, Elijah Dukes' two-run, 10th inning home run gave the Nationals a win.

Wellemeyer (7-1), who hasn't lost in seven starts since April 28, allowed five hits in six innings.

PIRATES 4, ASTROS 3: At Pittsburgh, Paul Maholm pitched eight strong innings, Jason Michaels hit a three-run homer and the Pirates beat the Astros for the second consecutive night. Jason Bay added a run-scoring triple to break a 3-3 tie in the fifth.

PADRES 2, METS 1: At San Diego, Scott Schoeneweis hit Paul McAnulty with a pitch to drive in the winning run with the bases loaded in the ninth inning, giving the San Diego Padres the victory. Schoeneweis (0-2) hit McAnulty with a first-pitch fastball in the right shoulder to score Scott Hairston and give the Padres their second straight win.

CUBS 5, DODGERS 4: At Los Angeles, Kosuke Fukudome had an RBI single with one out in the ninth inning to lead the Chicago Cubs to a victory over the Los Angeles Dodgers.