NEW YORK -- The Yankees gave George Steinbrenner a wacky win for his 75th birthday.
Jason Giambi had his first multihomer game in two years, Bernie Williams hit a tiebreaking single in a seven-run eighth inning and New York rallied past the Baltimore Orioles 13-8 Monday after wasting a big lead.
Steinbrenner did not attend the 4-hour, 12-minute, 397-pitch marathon, the longest nine-inning game in the major leagues this season, but Yankees manager Joe Torre assumed the owner tuned in on television.
"I'm sure it wasn't one he enjoyed watching. None of us did," Torre said. "But the end of it was certainly something I'm sure put a smile on his face."
Baltimore, coming off its best first half since 1997, quieted a Fourth of July sellout crowd of 53,844 by going ahead 8-6 as Brian Roberts and Jay Gibbons homered, Rafael Palmeiro hit a tying single in a three-run seventh and Luis Matos followed with a two-run double.
But after Todd Williams, Tim Byrdak and Chris Ray combined for 5 2/3 innings of shutout relief, the Yankees rallied against Steve Kline and B.J. Ryan (1-2) to win their third in a row and send the Orioles to their 10th loss in 12 games.
"We came back the way we used to," Bernie Williams said. "I think it's a great sign of good things to come."
New York, baseball's first team with a $200 million payroll, completed its most dismal first half in a decade at 42-39. The Yankees were 33-39 at the midpoint of the strike-shortened 1995 season, then rallied for a wild-card berth in the playoffs.
Giambi didn't think Steinbrenner would be smiling.
"It's a little early, I think, for that," Giambi said. "He wants a World Series ring, and so do we."
Put in New York's rotation because of Carl Pavano's sore shoulder, Tanyon Sturtze made his first start since Aug. 11 and allowed four runs, three hits and three walks in 3 2/3 innings. The new middle relief crew of Scott Proctor, Wayne Franklin and Jason Anderson gave up the lead, but Anderson (1-0) bounced back with a scoreless eighth to get his second major-league win.
Mariano Rivera pitched a flawless ninth, extending his scoreless streak to 23 innings.
"With the Fourth of July and everything, it was kind of an exciting atmosphere," said Anderson, who planned to take the subway back downtown.
Baltimore pitchers walked seven and hit three batters, while New York pitchers walked eight -- two with the bases loaded -- and hit one. New York wound up with two runners on second base at the same time in the eighth -- Bubba Crosby was out when he tried to stretch a single while Giambi stopped at second.
"Evidently," Torre said, "Bubba thinks he's faster than he really is."
Giambi made it 8-7 in the eighth with his second solo homer, the fourth Kline has allowed to a lefty this season.
"If I don't pitch better, it's going to be a rough year," Kline said. "I've been around a while, and I know I'm making it tough on this team by not getting these guys out."
Giambi has seven homers this season and 101 with the Yankees. He had not homered twice since July 18, 2003, against Cleveland.
"He's had to answer a lot of questions and had to endure a lot of stuff both on and off the field," Torre said. "Today could have been the best game he's had."
Alex Rodriguez walked on Ryan's 3-2 pitch with the bases loaded to force in the tying run, and Bernie Williams flared a two-run single to right.
"Sometimes it's better to be lucky than good," he said.
Matsui followed with an RBI grounder, Giambi was hit by a pitch and Crosby hit a run-scoring single off the glove of a diving Gibbons in right.
"That's a tough one to swallow, when so many guys came out of the bullpen and did such a good job," Ryan said. "They did a good job of going deep into the counts. Every time I left a ball up over the plate, they hit it."
Ryan blew a save for the third time in 21 chances.
"Right now, he's struggling," Orioles manager Lee Mazzilli said. "We've got to figure out how to get him back in the groove."
Palmeiro's hit left him seven shy of 3,000. Sammy Sosa, back in the lineup after two days off, started at designated hitter for the seventh time and went 0-for-3 with two walks. He has one hit in his last 37 at-bats and could DH a couple times a week, according to Mazzilli.
- Because of injuries, Yankees LHP Randy Johnson will make his first regular-season start on three days' rest since Oct. 2, 1995, for Seattle against the Angels. He is 4-1 with a 3.23 ERA in six regular-season starts on three days' rest.
- Umpires called Tony Womack out after he was picked off second base in the second even though Orioles 3B Melvin Mora tagged him with his empty glove while holding the ball in his hand. "We did not see that," crew chief Tim McClelland said.
- Sheffield was hit on the right thumb by Todd Williams' pitch in the fourth. The original call was a foul ball, but the umpires changed it to a hit by pitch.
- Roberts' homer in the third ended a 16-inning scoreless streak for Yankees pitchers.