Alexei Ramirez cranked the tie-breaking two-run homer in the seventh inning, and the Chicago White Sox beat the New York Yankees, 9-6, in a battle of division leaders.

DeWayne Wise, Adam Dunn and Gordon Beckham also hit home runs for the AL Central leaders, who fell behind 3-0 after two innings, but then scored nine times over their last four frames.

A.J. Pierzynski went 3-for-5 with an RBI, as Chicago bounced back after being swept in Kansas City over the weekend. The White Sox snapped a six-game home skid to the Yankees.

"We didn't get off to a good start tonight," Dunn said. "I think it shows the resiliency of this team. We just kept battling."

Derek Jeter went 4-for-5 with a homer and two runs scored, and moved up the all-time hits list. Jeter increased his career hit total to 3,255, which passed Nap Lajoie (3,252) and tied Eddie Murray for 11th place.

Mark Teixeira knocked in two runs, but the Yankees saw their lead in the AL East dwindle to four games over the Tampa Bay Rays.

Gavin Floyd and Hector Santiago, Chicago's first two pitchers, combined to give up nine hits and six runs over 5 1/3 innings. Brett Myers (2-1) finished the seventh inning and Addison Reed worked the ninth frame for his 22nd save of the season.

Freddy Garcia, who pitched for the White Sox for 4 1/2 seasons, tied a season- high with eight strikeouts over 4 1/3 frames, but also walked four and gave up five runs on six hits.

After the Yankees scored three times in the sixth inning, Beckham led off the bottom half with a homer to right field to tie the game.

Pierzynski dribbled a hit toward third base, tight to the line, with one out in the seventh inning. With two outs, Ramirez, who had a hit taken away by an umpire's ruling in the fifth inning, clubbed his seventh homer of the season, a shot to left field off Boone Logan (4-2), for an 8-6 margin.

Dunn smacked his major league-leading 36th homer of the year, a blast to left off Derek Lowe in the eighth.

Teixeira hit a run-scoring single as part of a two-run first inning, and Curtis Granderson singled in a run in the next inning. Robinson Cano was thrown out at home on the play in the second frame.

Even though the White Sox went ahead by scoring five times in the fifth, a frame in which the Yankees used four pitchers, they caught a bad break to start the inning. Ramirez hit a bouncer fair in the infield and the ball then bounded over third base and into foul territory. Third base umpire Bill Welke signaled fair, but the call was changed after a conference.

Instead of being at second with a double, Ramirez struck out.

Beckham singled before Wise, who played in 56 games for the Yankees earlier this season, homered to right field for a 3-2 margin. The White Sox then loaded the bases on a single and a pair of walks, and Cody Eppley replaced Garcia.

Alex Rios then sent a grounder to third base. Eric Chavez threw to second for the force play, and Kevin Youkilis scored. Clay Rapada was summoned from the bullpen, but he was greeted by Pierzynski's go-ahead single up the middle.

Joba Chamberlain gave up Dayan Viciedo's RBI single to right field to cap the outburst for a 5-3 Chicago lead.

"I said there's some inconsistencies," Yankees manager Joe Girardi said of Chamberlain. "We had to mix and match early. We thought he could get some outs for us, and he struggled a little bit trying tonight."

Jeter homered to left field in the sixth, and Teixeira and pinch-hitter Casey McGehee added RBI base hits later in the inning.

Game Notes

Viciedo owns a career-high 11-game hitting streak ... The White Sox have won 16 of their last 21 games at U.S. Cellular Field ... Rios, who went 1-for-5, is mired in a 3-for-35 slump over his last eight games ... Chicago's bullpen has allowed 10 runs over the last three games ... The Yankees left 12 men on base.