BOSTON (AP) -- Andy Pettitte 's statistics in his last two starts before the playoffs were unimpressive. His confidence is just fine.
The Yankees left-hander didn't get out of the fifth inning for the second time in nine days - both against the Red Sox - but New York beat Boston 6-5 in 10 innings Saturday in the first game of a day-night doubleheader to maintain a slim lead in the AL East.
"I would have loved to throw seven shutout innings in both of them, but I didn't," Pettitte said. "I felt good. I'm not worried about it now."
The Yankees and second-place Tampa Bay Rays already have clinched postseason berths but are fighting for the division title and home-field advantage throughout the AL playoffs. The Rays beat Kansas City 4-0 on Saturday night, ensuring that the AL East race won't be decided until the final day of the season.
"I don't think (Pettitte) pitched as well as he would have liked to," teammate Phil Hughes said, "but he was out there and his stuff was good. We all know what he can do in the postseason."
New York held a half-game lead over the Rays, pending the outcome of the nightcap in Boston. If the Rays and Yankees finish the regular season in a tie Sunday, Tampa Bay is the division winner because it won the head-to-head season series 10-8. The Yankees would get the wild card.
Pettitte allowed three runs on nine hits with eight strikeouts and two walks and left after Mike Lowell 's leadoff single in the fifth. In his previous start on Sept. 24 in New York, he allowed six earned runs on 10 hits in 3 1-3 innings of a 10-8 loss. He has made just three starts since spending two months on the disabled list with a strained left groin but is 11-3 with a 3.28 ERA for the season.
"More than anything, it's my command," Pettitte said. "I threw a lot of good cutters. I threw some flat ones, but I threw some good ones. It's just the command more than anything right now. I was missing with my breaking stuff today."
Hughes (18-8) struck out two batters in a perfect ninth in his second relief outing of the year, keeping the score tied at 5. Yankees pitchers tied a franchise record with 18 strikeouts. They also issued eight walks.
Jonathan Papelbon (5-7) started the 10th by walking Brett Gardner , who went to second on a sacrifice by Ramiro Pena . Derek Jeter then topped a slow grounder to the right side, just beyond Papelbon's reach, for an infield single. Second baseman Bill Hall tried to field it with his bare hand, but it got by him and Gardner scored the go-ahead run.
"Do or die. It was a tough play," Boston manager Terry Francona said. "It got behind him enough."
Mariano Rivera pitched the 10th for his 33rd save in 38 opportunities, ending a game that took 4 hours, 18 minutes. As the fans left, others waited outside Fenway Park to enter for the second game, which began less than an hour later.
The Yankees also were concerned about their starter in the nightcap. A.J. Burnett was 1-7 with a 6.98 ERA in his previous 11 starts and could be pitching for a roster spot in the first round of the playoffs.
The split doubleheader was scheduled after Friday night's game was postponed by rain following a delay of 3 hours, 23 minutes.
Boston took a 2-0 lead in the first on a single by Victor Martinez , a walk to David Ortiz and a double by Lowell that sailed just over the head of right fielder Nick Swisher .
New York went ahead against knuckleballer Tim Wakefield with three runs in the third. Jeter walked and scored on a triple by Curtis Granderson , who came around on a groundout by Alex Rodriguez . Robinson Cano followed with a solo homer, his 29th of the year.
The Red Sox tied it at 3 in the third when Lowell walked, went to third on a single by Hall and scored on a single by Daniel Nava .
Boston had runners at first and third with one out in the fourth before Pettitte struck out Martinez and Ortiz.
"That was a good sequence," Pettitte said. "For those two hitters I felt good and felt like I was putting the ball exactly where I wanted. I just need not to do it for two batters in an inning, I need to do it for six or seven innings."
The Yankees went ahead 5-3 in the fifth on a walk to Granderson and run-scoring doubles by Mark Teixeira and Cano.
But Boston scored two runs on wild pitches, tying the game. In the seventh, Lars Anderson walked, took third on a single by Hall and scored on a wild pitch by Joba Chamberlain . In the eighth, Kerry Wood walked three straight batters, then threw a wild pitch that scored Eric Patterson .
Josh Reddick also tried to score when catcher Jorge Posada threw wildly past Wood at the plate, but third baseman Pena made a terrific play to retrieve the ball and cut down Reddick on a close play at home.
Notes: Red Sox pitchers struck out 14 and walked seven. ... Lowell had a double, walk and single in three plate appearances. Before the game, the Red Sox honored him in a 20-minute ceremony called "Thank You, Mike." Lowell, a third baseman most of his career who primarily played first this year, is retiring after his 13th season ends Sunday. Francona said he wanted Lowell to go out with a hit so he doesn't plan to use him Sunday. ... The 44-year-old Wakefield wrapped up his 15th, and possibly last, season. He's due to make $2 million on a one-year contract next season but has struggled for most of this year.