The victory enabled the Yankees to maintain a one-game advantage in the division over the Red Sox, who rallied past Toronto 5-4. The longtime rivals play three times at Fenway Park this weekend, and two wins would give New York its eighth consecutive AL East crown.
"It'll be unbelievable. It's always a playoff atmosphere when you play the Red Sox," Giambi said. "It will be a lot of fun."
Alex Rodriguez had two hits and scored twice for the Yankees, who built an 8-0 lead in winning for the 15th time in 18 games.
After the victory, the Yankees watched the Red Sox beat Toronto, which held a 4-1 lead in the fifth inning. When David Ortiz got the game-winning hit, the Yankees began packing for their trip to Boston.
"You figured they would come back," Giambi said. "They're hot, we're hot, so it should be a good series. You couldn't ask for a better ending, no doubt about it."
Small gave up two runs and four hits in 6 2/3 innings, striking out four and walking five. After breezing through the first six innings, the right-hander gave up a two-run homer to Javy Lopez in the seventh.
Small has won his last five starts, including two straight against Baltimore. He has been nothing short of magnificent since his recall from Triple-A Columbus on July 17.
"He's been a bonus, though that seems like such a mediocre word," Yankees manager Joe Torre said.
Small became the first pitcher to win his first 10 decisions with the Yankees, according to the Elias Sports Bureau. He also stands to become only the fourth pitcher in major-league history to finish a season unbeaten with 10 or more wins, joining Tom Zachary (12-0) of the 1929 Yankees, Howie Krist (10-0) of the 1941 St. Louis Cardinals and Dennis Lamp (11-0) of the 1985 Toronto Blue Jays, Elias said.
"This is fun. I couldn't have scripted it this way. I'm just hoping for a fairy tale ending," Small said.
Lopez homered for the third time in three games, and Jay Gibbons also connected for the Orioles, who have lost 11 of 12. Despite losing its final home game, Baltimore is assured of finishing no worse than fourth in the AL East due to Tampa Bay's 6-0 defeat in Cleveland.
But avoiding the cellar is not exactly what the Orioles had in mind when they led the division on June 23.
"It's been a tough season," said interim manager Sam Perlozzo, who expects to find out next week if he will be back in 2006. "I'd like the fans to think that things are going to turn around. I'd like for them to think good things about us for next year. That'll be our job this winter, to give them some reasons to believe that."
New York took control in the first inning against Erik Bedard (6-8), who needed 40 pitches to retire the side. After a walk to Derek Jeter and a single by Rodriguez, Giambi drove a 3-2 pitch over the 25-foot scoreboard onto Eutaw Street, a shot estimated at 425 feet.
The Yankees made it 5-0 in the second when Robinson Cano hit a leadoff double and scored on a two-out single by Sheffield.
Bedard allowed five runs, five hits and three walks in two innings. After going 5-1 with a 2.08 ERA in his first nine games, he returned from a two-month stint on the disabled list (knee) to go 1-7 with a 5.44 ERA over his last 15 starts.
"I'm disappointed in his second half, but I'm totally optimistic he's going to be just as good coming out of the chute next year," Perlozzo said. "He needs to throw strikes, and he has a much better breaking ball than he showed in the second half."
Small issued three straight two-out walks in the third before striking out Melvin Mora on three pitches.
"Giambi got us off on the right foot and Matsui gave us a padding that didn't seem like a big deal at the time, but turned out to be huge," Torre said.
Gibbons hit his 25th with a runner on against Sturtze in the eighth. Tom Gordon got two quick outs to end the inning, and Scott Proctor worked a scoreless ninth -- allowing closer Mariano Rivera to rest for the Boston series.
- Small has not allowed a first-inning run in any of his nine starts.
- Baltimore finished 36-45 at home and drew 2,624,740 fans.
- New York won the season series 11-7.
- Giambi's homer was the 38th in the 14-year history of Camden Yards to reach Eutaw Street, the first this year.