ST. PETERSBURG, Fla. (AP) -- Andy Pettitte wriggled out of several early jams and finished with a typical result against Tampa Bay.
"All of my pitches were working for the first time," Pettitte said. "I'm definitely pleased with where it's going. Each game has gotten better and better. I'm just real happy that I was able to get to my curveball a lot tonight. My curveball has been non-existent."
Pettitte (2-1) gave up nine hits -- seven in the first three innings -- struck out five and walked three. The left-hander is 14-3 against Tampa Bay overall, including 8-1 in games at Tropicana Field. Pettitte got the loss in his first start of the season against the Rays on April 5.
"I felt like I was throwing batting practice through the first three innings," Pettitte said. "They were just so aggressive and obviously getting hits. I was fortunate to get out of the first couple innings without letting them do too much damage."
Mariano Rivera pitched the ninth for his fifth save in five opportunities.
The Yankees open a two-game home series with Boston Wednesday.
"I think it was important that we won these two games," Yankees manager Joe Girardi said. "We go home with a 4-4 road trip that didn't start off too well. We lost the first two, won a couple, then lost two more. Hopefully it carries over."
Bobby Abreu walked, went to third on Alex Rodriguez's 400th career double and scored on Matsui's run-scoring grounder to tie it at 2 in the fourth. A-Rod then scored on Edwin Jackson's wild pitch to make it 3-2.
Derek Jeter and Abreu extended the Yankees' advantage to 5-2 with run-scoring singles in the fifth. Jeter's hit came on a nine-pitch at-bat, while Abreu had been hitless in his previous 12 at-bats against Jackson.
Jackson (2-1) gave up five runs and four hits in five innings. He struck out four and walked four.
"It's just one of those games where you battle and try to keep the team in it by keeping the game as close as possible," Jackson said.
Jason Bartlett hit an RBI infield single in the sixth to get Tampa Bay to 5-3.
The Yankees failed to score after loading the bases with one out in the seventh. Abreu flew out and Rodriguez struck out against J.P. Howell. Rodriguez is 1-for-14 with runners in scoring position this season.
New York also left the bases filled in the eighth when Johnny Damon flew out with two outs.
Tampa Bay loaded the bases with one out in the bottom of the second, but Pettitte worked out of the jam by inducing a double-play grounder from Bartlett.
"We gave ourselves a lot of chances and we couldn't finish it off," Rays first baseman Carlos Pena said. "We couldn't get to Pettitte."
Girardi said C Jorge Posada (right shoulder) is getting close to playing defense. Posada can DH. ... Former Yankees general partner Steve Swindal attended the game. ... Yankees RHP LaTroy Hawkins might switch from No. 21 to 22 Wednesday. Some fans have objected to the pitcher wearing the number used by former OF Paul O'Neill. Hawkins declined to discuss the matter after the game. ... Pettitte has won seven straight decisions at Tropicana Field. ... The entire Rays team wore No. 42 in honor of Jackie Robinson Day. Robinson made his major league debut 61 years ago Tuesday. Girardi, 2B Robinson Cano, SS Derek Jeter and closer Rivera, whose regular number is 42, also wore No. 42. "Sixty-one years later, the impact is still felt on a daily basis," Girardi said. ... Rays RHP Matt Garza (right arm nerve irritation) threw off a bullpen mound. He could return before the end of the month. ... The Rays and Triple-A Durham have agreed to a two-year player development contract extension through 2010.
Bonds, balks and umps packing heat: Here's what 'this day in MLB history' leaves out
Sam Miller uncovers the most bizarre -- and sometimes profound -- forgotten baseball tales from the fourth of June.
Ranking every No. 1 MLB draft pick of all time
From Hall of Famers to bench players to all-out busts, the top overall pick in baseball's draft is no guarantee. We rank all 54 based on how they turned out.
Flashback: Bonds goes deep for the first time in his career
Flash back to June 4, 1986, when Barry Bonds smacks the first of his 762 career home runs.
MLB rejects 114-game plan, tells union no counteroffer
Major League Baseball rejected the players' offer for a 114-game regular season in the pandemic-delayed season with no additional salary cuts and told the union it did not plan to make a counterproposal, a person familiar with the negotiations said.
Pirates' Chris Archer out until 2021 after surgery
Pirates right-hander Chris Archer underwent surgery Tuesday that will keep him out until the 2021 season.
What is the divide between MLB players and owners?
ESPN MLB Insider Jesse Rogers provides more insight into the current financial divide between MLB players and owners that is preventing the MLB season from starting.