Raul Ibanez woke up a silent Yankee Stadium in the ninth inning, then made it erupt in the 12th.
Ibanez, pinch-hitting for a struggling Alex Rodriguez in the ninth, tied the game with a solo homer off Jim Johnson and three innings later sent a Brian Matusz offering into the second deck in right field to give the New York Yankees a wild 3-2 victory over the Baltimore Orioles.
The dramatic turnaround gave the Yankees a 2-1 lead in the American League Division Series after the clubs split a pair in Baltimore.
The Orioles had won an unfathomable 16 straight extra-inning games and had not suffered a walk-off loss all season.
Now, they are on the brink of elimination.
"One pitch, that's the world we live in," Orioles manager Buck Showalter said.
The AL East-champion Yankees have a chance to close out the best-of-five set on Thursday with Phil Hughes on the mound opposite Joe Saunders.
"Joe is a guy that gives you a chance to win, and he'll compete, and he knows we feel good with him out there," said Showalter, who chose Saunders to start over Chris Tillman.
Baltimore was 29-9 in one-run games during the regular season and eked out a 3-2 win to even the series on Monday. Another close victory was two outs away when Rodriguez's spot in the order came up in the ninth.
Rodriguez, 1-for-12 with seven strikeouts in the series, did not make it out of the dugout.
Yankees manager Joe Girardi inserted the veteran Ibanez, who had 19 of New York's franchise-record 245 home runs in the regular season. Johnson, the losing pitcher in Game 1, grooved a 94-m.p.h. fastball in Ibanez's wheelhouse, and one of the suddenly-rowdy fans in right-center was given a memorable souvenir.
"I just had a gut feeling," Girardi said on his decision to pinch-hit Ibanez. "You've got a left-handed hitter who's a low ball hitter in a sense and you've got a low ball pitcher. I just kind of had a gut feeling."
Matusz (0-1) also caught took much of the plate with his first pitch in the 12th, and Ibanez hammered it into the second deck to put an exclamation point on his heroic night.
"I don't even remember what happened. It was kind of a blur," Ibanez admitted. "I was just trying to get a good pitch to hit."
It was the first time in MLB history a player hit two homers in a postseason game with both coming in the ninth inning or later.
David Robertson (1-0) hurled two innings of relief to earn the win, allowing only one hit when he and Mark Teixeira failed to communicate on a pop up.
Derek Jeter went 2-for-4 with an RBI triple, but exited in the ninth inning with a bone bruise he suffered when he fouled a pitch off his left foot early in the game. Girardi listed the future Hall-of-Fame shortstop as day-to-day.
Johnson's blown save spoiled a stellar start by Miguel Gonzalez, who shut down New York's vaunted lineup over seven innings, giving up just one run on five hits with no walks and eight strikeouts.
Hiroki Kuroda was nearly as effective in his outing, allowing five hits and two runs -- on homers by rookies Ryan Flaherty and Manny Machado -- over 8 1/3 innings.
The only legitimate hit the Orioles recorded off the Yankees bullpen came in the 10th. Robert Andino opened with a single off Rafael Soriano, and a sacrifice bunt moved the runner into scoring position. Nate McLouth followed with a sharp comebacker through the middle, but Jayson Nix, filling in for the injured Jeter, snagged the liner and stepped on the bag to double off Andino.
Gonzalez, a 28-year-old rookie from Mexico, beat the Yankees in two starts in the Bronx during the regular season and was in line for another win thanks to allowing just three at-bats with runners in scoring position.
All those chances came in the third when Russell Martin doubled with one away. After a groundout, Jeter fisted a fly ball to center field that kept drifting away from Adam Jones. The usually sure-handed Jones couldn't catch up with it on the warning track, and Jeter legged out a triple despite being hobbled.
Martin's run tied things after Flaherty, a Rule 5 Draftee last year, sent a first-pitch curveball over the right-field wall in the top half.
Machado, who became the youngest Oriole to record a postseason hit at 20 years old in Friday's Wild Card win against the Rangers, added to his young postseason resume in the fifth when he took a hanging breaking ball over the wall in left-center and into a delighted Baltimore bullpen.
Flaherty and Machado are the first pair of rookie teammates to homer in the same postseason game in MLB history.
The Yankees have lost their last three ALDS after splitting the first two games ... New York was a Major League-best 51-30 at home in the regular season, but had lost all three series to the Orioles ... New York was 1-58 in the regular season when trailing after eight innings ... Baltimore was 74-0 when leading after seven innings ... Johnson, the MLB leader in saves (51), has already allowed two homers in the series after serving up three in 68 2/3 innings during the regular season ... All three of the Orioles' extra-inning losses this year have come against New York.