Updated

One night after getting stomped by the New York Yankees, the Baltimore Orioles turned in an inspired performance against their AL East rivals.

Unfortunately for Baltimore, the game had a sickeningly familiar ending.

Russell Martin singled home the tiebreaking run in the 11th inning after Mariano Rivera gave up the lead in the ninth, and the Yankees escaped with a 6-3 victory Sunday.

Less than 24 hours earlier, the Orioles yielded five home runs in a 15-3 defeat. In this one, they rallied from a three-run deficit and forced extra innings on a double by Brian Roberts with two outs in the bottom of the ninth.

It all came apart in the 11th, however, after a 40-minute rain delay.

"I won't say it messed us up," center fielder Adam Jones said, "but we had a lot of momentum going before it. What can you do?"

In a three-run 11th, the Yankees got three infield hits and took advantage of two Baltimore throwing errors.

"We didn't do enough to win," Jones conceded.

But at least Baltimore didn't go quietly after falling behind 3-0.

"I was real proud of everybody," manager Buck Showalter said. "We'll get some breaks to go our way and we'll keep battling."

Mark Reynolds, who hit a two-run homer, said, "We just got some bad bounces here, bad bounces there, and come out on the losing end somehow."

Robinson Cano led off the 11th with a double off Jason Berken (0-1). After Nick Swisher failed on a bunt attempt, Cano was caught between the bases. Catcher Matt Wieters threw to second, and Cano scampered safely to third.

Swisher struck out, and after an intentional walk to Eric Chavez, Martin hit a grounder deep in the hole to shortstop Robert Andino, who threw wildly to second in a desperate attempt to start a double play.

"It's just a firm ground ball that was hit in the right spot," Showalter said. "Robert tried to make a great play and I applaud him for it."

One out later, Derek Jeter hit a slow roller to third, and Reynolds' throw went awry on what was ruled an infield hit. Curtis Granderson followed with an RBI single off the glove of Roberts at second base.

Boone Logan (1-1) got four outs, and Buddy Carlyle retired the final two batters.

Jeter had four hits for the Yankees, who earned their sixth straight series win at Camden Yards. New York is 41-17 against Baltimore since the start of the 2008 season.

After Reynolds homered off Chamberlain to make it 3-2 in the seventh, the Orioles drew even in the ninth. With runners on first and second and two outs, Roberts bounced a double into the right-field corner. One run scored, but Andino was thrown out at the plate by Cano, who took the relay from Swisher.

"A perfect relay is what it takes," Yankees manager Joe Girardi said. "Swish comes up and hits the cutoff man, hits Robbie, and Robbie makes a good throw and we get Andino."

In the top of the 10th, New York had runners at the corners with one out when Alex Rodriguez lifted a fly ball to medium center. Jeter tagged up at third and Jones uncorked a dart that reached Wieters in the air.

Wieters had the plate blocked, and he tagged Jeter for the final out.

"Pretty simple," Jones said. "Who cares about the cutoff man in that situation? If I one-hopped it or anything like that, he would have been safe."

Freddy Garcia pitched six innings of two-hit ball for New York and left with a 3-0 lead. He struck out seven and walked two in his second start with the Yankees. The right-hander permitted one runner past second base and retired 13 of the last 14 batters he faced.

With the score 3-2 in the eighth, the Orioles got runners on the corners with two outs in the eighth against David Robertson.

Rivera came in to face Luke Scott, who hit an opposite-field liner to left that the speedy Brett Gardner snagged just short of the warning track. In a rare outburst of emotion, a grinning Rivera thrust his right arm upward before walking off the mound.

"It's a game-saving play is what it is," Girardi said.

Orioles starter Jake Arrieta gave up three runs, five hits and three walks in six innings. The right-hander had a career-high nine strikeouts.

New York needed only four pitches to take a 2-0 lead. After Jeter singled on Arrieta's first offering, Granderson hit a 1-1 pitch into the right-field seats, his team-high seventh homer of the season.

Arrieta rebounded from his poor start to keep the Yankees in check until the fifth, when Granderson doubled and scored on a grounder by Rodriguez.

NOTES: Reynolds' homer ended his 0-for-22 skid. ... Roberts stretched his hitting streak to 11 games. ... Cano extended his hitting streak to 13 games, and now has hit in 16 straight games against the Orioles.