The Orioles crafted another 10-run inning, their second in two games, and stormed to a 13-2 victory before 47,674. But New York clinched the American League East by virtue of Boston's 8-6 loss to the Devil Rays.
Rookie Chris Richard crushed a three-run homer off reliever Dwight Gooden in the second to move the Orioles into double digits, and added a two-run shot in the eighth.
They became the second team since 1900 to score at least 10 runs in an inning in consecutive games. The Houston Astros did it in both ends of a July 30, 1969, doubleheader against the New York Mets.
Richard's blast came two batters after Cal Ripken homered for the first time since June 10 against Philadelphia. Ripken also had a run-scoring single in the second to chase Pettitte.
The Orioles' early lead remained safe in the hands of Chuck McElroy and four relievers. McElroy, making his second start after 603 relief appearances, went a career-high six innings. He threw 88 pitches, also a personal best, while limiting the Yankeees to three hits. He's allowed one run and six hits in 11 innings as a starter.
The Yankees' magic number turned to zero when the Red Sox fumbled a 4-0 lead against the Devil Rays. They needed some assistance, having lost 13 of their last 16 games, including five in a row. The Orioles, with nothing to play for except pride and the satisfaction that comes from being spoilers, have won six of their last nine.
"We did what we had to do and we did what we wanted to do. And we made the Yankees work for it," said manager Mike Hargrove, whose club has scored 36 runs in the last two games, a franchise record, after totaling 87 the rest of the month.
"I feel very good for those guys, to go ahead and clinch this thing. I'm glad they clinched it the way they did instead of beating us."
It's become something of a tradition for the Yankees to celebrate on the Orioles' home turf. Four years ago, they advanced to the World Series by eliminating the Orioles from the American League Championship Series. The deciding game was played in Baltimore.
The past two seasons, they've captured the division by posting road victories over the Orioles. Their fans pack the seats behind the visitors' dugout, chanting "Let's Go, Yankees" amid hugs and high-fives.
Last night, they sat in stunned silence until Tampa Bay's win was posted on the scoreboard. The cheering seemed more an expression of relief.
"You play 162 games. You're going to go through good times, you're going to go through bad times," said shortstop Derek Jeter. "It's not how we wanted to do it, but who cares?"
The Orioles sent 14 batters to the plate in the second inning, just as they did against Toronto on Thursday while tying the club record with 10 runs. Pettitte threw 28 balls among his 43 pitches, including 11 in a row. He was charged with nine runs in 1 1/3 innings, and denied a 20-win season.
Pettitte walked the bases loaded with none out before Brook Fordyce bounced a single into center field to score two runs. Luis Matos grounded to short for an apparent double play, but second baseman Chuck Knoblauch's relay throw was high as the lead jumped to 3-0.
Brady Anderson walked on four pitches and Jerry Hairston slapped a run-scoring single to right. The runners moved up when Paul O'Neill's throw skipped past catcher Jorge Posada, and the bullpen finally began to stir when Delino DeShields lined an RBI single into right field on a 3-0 pitch.
Pettitte was removed after run-scoring singles by Albert Belle and Ripken. It was Belle's third RBI in two games, giving him 100 for the ninth consecutive season. Only three others players - Jimmie Foxx (13), Lou Gehrig (13) and Al Simmons (11) - have put together longer streaks.
Richard took Gooden deep to complete an onslaught that raised Pettitte's ERA from 3.98 to 4.35. The Yankees scratched out a run in the third, but it was a futile gesture. They'll stagger into the weekend still groping for the form that made them two-time world champs.
If the season ended today, the Yankees (87-72) would hold the worst record among playoff teams, including the wild-card entries. They'll send out David Cone tonight, with 13 loses in 17 decisions, against Mike Mussina in an emotion-packed atmosphere.
Mussina could be running out of starts with the Orioles. If not for Boston's generosity, the Yankees might have been running out of chances.
McElroy remains a long shot to crack the rotation next season, but he's proven to be a viable alternative when a spot opens. He tossed five shutout innings against Oakland on Sept. 20, allowing only three hits in a 2-0 victory. He put at least one runner on base in the first five innings, twice hitting Jeter, but the only run off him scored on a two-out single by Bernie Williams in the third.
"He certainly gives us an option going into the off-season," Hargrove said. "I'm not going to sit here on Sept. 29 and say that Chuck McElroy's going to be a starter going into next season. But it opens up options for us; it opens up avenues of thought that two months ago we hadn't really considered seriously."
Said McElroy: "You have to be versatile. I'm just glad that I can possibly do both and help out any way I can. I'll just be ready whenever and have fun regardless."
Buddy Groom faced one batter in the ninth, allowing a single to Williams, for his 69th appearance this season. He needs one more to become the first pitcher to reach 70 in five consecutive seasons.