ANAHEIM -- Andy Pettitte was the stopper once more for the Yankees' Southern California troubles, logging his fifth consecutive victory by posting an 8-2 victory over the Angels on Wednesday.

Behind Pettitte's seven innings of one-run ball, the Yankees salvaged the finale of a three-game series at Angel Stadium, moving back within five games of the Red Sox in the AL East and 1 1/2 games behind the Mariners in the AL Wild Card race.

"Andy knows when it's important for us to win, but every time he goes to the mound it's important for him to win," Yankees manager Joe Torre said. "This game was enormously important."

Always a strong second-half performer, Pettitte has been especially on point as the Yankees pursue their postseason hopes, limiting opponents to eight earned runs over his last 35 innings.

As he did following his last victory, Pettitte credited small mechanical adjustments made prior to an Aug. 12 start at Cleveland for his resurgence of late.

"I'm really just feeling good," Pettitte said. "My command's been there and that's the key. I'm throwing my stuff for strikes and my two-seamer has been there. It's been a big pitch for me.

"Whenever you don't have command of the outside corner, and I lost it [earlier in the season], it's frustrating and it's difficult to pitch. Obviously I was running deep into counts with everybody. Not being able to throw deep into games is frustrating for me."

He didn't have that problem on Wednesday, pitching in front of a sellout crowd of 44,326 at the Big A.

Striking out six and walking two, Pettitte's only real blemish in a five-hit performance came in the sixth inning, as Orlando Cabrera hit a home run past the 387-foot mark in left-center to tie the game.

The Yankees regained the lead in the seventh, scoring twice on run-scoring hits by Melky Cabrera and Derek Jeter.

"You always have confidence when he's pitching," Jeter said. "Today, he was as good as he's been all year. They have a tough team and they don't strike out much. They put the ball in play, and they're pests on the basepaths. He made one mistake and I don't even know if you can call it a mistake."

On both sides, Pettitte and Angels starter John Lackey locked heads, with each pitcher surrendering just one run through the first six innings before New York pulled away.

"He was in a good rhythm and so was I," Pettitte said. "We were getting some quick outs. That's always nice to be able to do. It was just a good game."

In the seventh, Cabrera brought home Jorge Posada with a hard one-out single through the right side, breaking a 4-for-34 slide for the outfielder. Jeter added an RBI hit to right field that scored Robinson Cano, before Jeter was thrown out at second base to end the inning.

Bobby Abreu padded the Yankees' lead with a home run leading off the eighth, chasing Lackey, who came up short in his attempt to become the Major Leagues' first 16-game winner this season. The right-hander allowed 10 hits and four runs in seven-plus innings, walking three and striking out four.

Cano and Hideki Matsui each had three of New York's 16 hits, helping to fluff a late cushion for rookie Joba Chamberlain, who struck out the side around a single in the eighth.

The final out the 21-year-old Chamberlain recorded was a swinging strikeout of Vladimir Guerrero, who waved at a biting slider in the dirt for Chamberlain's 14th strikeout in just eight innings of Major League service.

"That's big no matter who you're facing, and especially a guy of Vlad's status," Chamberlain said. "He goes up there to take care of business and that's what he does best."

Mariano Rivera surrendered a run in the ninth inning but recorded the final three outs for the Yankees, who won just three of nine games against the Angels this season and would not see the scrappy club again until a potential postseason series.

The game also marked Torre's 1,150th win as Yankees manager, passing Casey Stengel for sole possession of second place on the franchise list behind Joe McCarthy (1,460).

"That's the biggest one for me," Torre said. "This was my lifetime, when I was growing up in the '40s and '50s in New York, during the five straight championships. Casey was obviously the architect of this whole thing. I'm very proud of this."