OAKLAND -- Hideki Matsui celebrated his birthday in style, providing a very special gift for the Yankees.

Matsui's sixth-inning grand slam lifted New York to a 4-1 victory on Thursday at McAfee Coliseum, helping the Yankees take the rubber game of their three-game series with the Oakland Athletics.

"Birthday boy," Yankees manager Joe Girardi said. "I mean, that's what you're supposed to do on your birthday, isn't it? He hit it hard."

The Yankees had been kept off the scoreboard through the first five innings by A's starter Joe Blanton, who dodged trouble with a solid array of pitches. New York opened a rally in the sixth as Derek Jeter singled and both Bobby Abreu and Alex Rodriguez walked, setting up Matsui's fifth career grand slam and the Yankees' first of the season, a deep drive to right field.

"I was looking for a pitch up in the zone, something that I could hit to the outfield," Matsui said through an interpreter. "I got a changeup up in the zone and was able to put a good swing on it."

Before the game, Matsui had been presented with a cake by the Japanese media contingent following the Yankees, but the now-34-year-old slugger wasn't about to give credit to the batch of sugar, frosting and eggs. He said he never touched the cake, jokingly pulling at his side.

Whatever the power source, the run support was appreciated most by left-hander Andy Pettitte, who limited Oakland to one run over a season-high eight innings, snapping a two-start winless string.

Pettitte had allowed 14 earned runs over his last 14 2/3 innings pitched coming into Thursday's game but was a much different pitcher, allowing just a second-inning RBI single to A's outfielder Carlos Gonzalez before quieting the A's bats and evading jams.

"Wins are good -- they're better than losing, that's for sure," Pettitte said. "It was nice to win. I've been extremely disappointed after my last two starts. The guys gave me a lead again and I just didn't want to give it up."

Not that Pettitte might not have been a little gun-shy after his previous pounding, taking a 10-run hit in a no-decision on Saturday against the Royals. After Matsui's grand slam, Pettitte internally resorted to a little negative reinforcement -- it did the trick, but it wasn't exactly ideal.

"I was telling myself, 'You idiot, don't you dare give this lead up,'" Pettitte said, laughing. "After the last two games, I didn't have a real good mind-set, because that's really not the mind-set you want to have."

"He needed to win that game," said Mariano Rivera, who pitched a scoreless ninth inning for his 18th save. "He came back strong. He did what he knows how to do."

After Rivera had polished off his 10th save in New York's last 10 road victories, it turned out that the big moment for the A's had come in the fifth inning, after Daric Barton had singled and Kurt Suzuki reached on a Jason Giambi error at first base.

A sacrifice bunt moved the runners up and Pettitte -- already trailing 1-0 -- was in trouble. Pettitte reached back to strike out Bobby Crosby on an 82-mph cutter and then induced Jack Cust to fly out to the warning track in left field, evading the big inning.

"I didn't want to press too much," Pettitte said. "I felt good and got the opportunity to go for a strikeout. I made a good pitch and was able to strike [Crosby] out. It was obviously big."

"With a guy like that, you've got to get him early," Crosby said. "You have to capitalize on every opportunity against him, because if you don't, he's going to make you pay."

The victory gave Pettitte 170 for his career as a Yankee, surpassing Ron Guidry for fourth place on the Yankees' all-time list. Pettitte's connection to Guidry went far past just his duties as the club's former pitching coach -- a Louisiana native, Guidry spoke to Pettitte's father, Tom, shortly after he signed with the organization in May 1991, fielding inquiries about just what his son was in for.

"It's extremely special," Pettitte said. "He's a great friend of mine and I love him to death. It's special because he's one of the Yankees greats. All the years being around him, playing golf in Spring Training, he's just a great man. It's an honor to have that many wins."

Blanton worked 6 2/3 innings in the losing effort, scattering six hits and surrendering just the four runs from Matsui's home run -- the slugger's first grand slam since July 25, 2004, at Boston. Blanton walked three and struck out two before turning the pitching over to reliever Andrew Brown in the seventh.

With the victory, the Yankees once again moved one game above the .500 mark at 34-33. Of the Yankees' 34 road games this season, 24 have been decided by three runs or less, including 18 of their last 22 away from Yankee Stadium.

"Hopefully we can get on a roll," Pettitte said. "It was good to come here and take this series. Hopefully we can keep right on rolling. That's the goal. We don't want to sit here at .500."