Nick Swisher hit a two-run homer in the 10th, and the New York Yankees beat Baltimore 6-4 Wednesday night for their second straight extra-inning win and a three-game sweep of the Orioles.

Curtis Granderson homered and drove in three runs for the Yankees, who won consecutive extra-inning road games for the first time since July 16-17, 2001, at Philadelphia, according to STATS LLC.

After getting swept at Tampa Bay and starting 0-3 for the first time since 1998, the Yankees are back to .500 heading into their home opener against the Los Angeles Angels on Friday.

With two outs in the 10th, Mark Teixeira hit an opposite-field pop off Kevin Gregg (0-1) that landed just inside the left-field line and between third baseman Mark Reynolds and left fielder Nolan Reimold.

Swisher then worked the count full before hitting a no-doubt drive into the center-field bleachers.

Rafael Soriano (1-0) worked 1 1-3 innings of one-hit relief and 42-year-old Mariano Rivera got three outs for his second save of the season and No. 605 of his career. One night earlier, Rivera sealed a 5-4, 12-inning win.

New York starter CC Sabathia gave up four runs and eight hits in six innings, striking out eight and walking two. The left-hander won his previous seven starts at Camden Yards, and although that streak ended, he retained his 16-2 record against Baltimore.

Sabathia took a beating on the mound in a fashion that had nothing to do with his pitching line. He was smacked in his left hand trying to catch a bouncer up in the middle in the second inning and had a line drive hit his left foot in the fifth.

Robert Andino and Reynolds had two RBIs apiece for the Orioles, and starter Jake Arrieta allowed four runs and five hits in 6 2-3 innings.

Reynolds hit a two-run, two-out double in the fifth inning to give Baltimore a 4-3 lead. Although he walked twice earlier, Reynolds was 0 for 6 with three strikeouts against Sabathia.

New York pulled even in the seventh. After Orioles manager Buck Showalter lifted Arrieta with a runner on first and two outs, Luis Ayala promptly walked Derek Jeter on five pitches, and Granderson bounced an RBI single into left field.

The Yankees put runners at second and third with two outs in the eighth before Ayala struck out Russell Martin.

After throwing seven shutout innings against Minnesota on opening day, Arrieta's perfect ERA vanished when Jeter led off with a double and Granderson followed with his first home run, which also provided him with his first two RBIs.

Arrieta retired the next 11 batters before Teixeira singled with two outs in the fourth.

Sabathia struck out three of the first four batters before Matt Wieters singled and Reynolds walked. Sabathia then tried to barehand a smash up the middle by Ronny Paulino, and although the ball struck his hand, he wasn't hurt. But the single loaded the bases, and Andino tied it by lining a two-out single to center.

Baltimore loaded the bases with two outs in the third before Paulino hit into a force play. By then, however, Sabathia's pitch count was already at 74.

New York took advantage of a wild streak by Arrieta to take a 3-2 lead in the fifth. A walk, a hit batter and a single loaded the bases with no outs for Jeter, who drove in a run with a chop off the plate.

NOTES: The start of the game was delayed by rain for 20 minutes. ... For the first time this season, the Orioles failed to homer in either the first or second innings. ... Teixeira turned 32. ... After an off day Thursday, the Orioles begin the road portion of their schedule in Toronto. ... Sabathia held the opposition scoreless in his second start in each of the previous three seasons.