Girardi lifted Pettitte (5-1) with a three-run lead in the sixth inning to keep the left-hander from further straining his lower back and New York moved into first place in the division with a 3-1 win over the Cleveland Indians on Friday night.
"Andy didn't want to come out, but I was thinking long-term and said, 'That's enough,'" Girardi said after New York snapped the Indians' season-high winning streak at four games.
The Yankees took a half-game lead over Boston, which lost in Toronto 6-3. New York has won 13 of 17 since May 13 and have sole possession of first place for the first time since the final day of the 2006 season.
"It's better than not being in first place," Girardi said.
"I'm OK," the 36-year-old Pettitte said. "I guess it's a little bit of old age. I strained it in Texas earlier this week, then slipped a few times on the wet mound tonight. I was over-striding and the dirt was loose. Joe made the right decision."
Jorge Posada had two hits in his return to the Yankees' lineup. The catcher missed 22 games with a strained right hamstring.
Mariano Rivera pitched the ninth for his 10th save in 11 chances. It was the 58th time he saved a win for Pettitte -- the most for a pitching combo since the save became an official stat in 1969, according to the Elias Sports Bureau. Hall of Famer Dennis Eckersley saved 57 wins by Bob Welch for Oakland.
"He's just awesome," Pettitte said of Rivera, who has 492 career saves. "It's such an honor to play with him for so long."
Pettitte allowed six hits before leaving with two runners on and none out in the sixth.
Girardi and assistant trainer Steve Donahue went to the mound after Pettitte went to a 2-0 count on Jamey Carroll. After a short discussion, Pettitte jogged to the dugout and was replaced by Alfredo Aceves.
"When I saw the four-pitch walk to [Ben] Francisco, then he threw two balls to Carroll, I could see Andy wasn't finishing his pitches," Girardi said. "He wasn't pushing off, but was trying to gut it out."
In the fourth, Donahue and Girardi had checked on Pettitte after he bent over with his hands on his knees following a pitch. The left-hander stayed in the game without throwing any warmup pitches.
Aceves completed a walk to Carroll that was charged to Pettitte, loading the bases with none out. But Cleveland scored only one run, on a sacrifice fly by pinch-hitter Shin-Soo Choo that made it 3-1.
"Ace did an unbelievable job," Pettitte said.
The right-hander gave up one hit and struck out three over three innings.
Cliff Lee (2-6) worked into and out of jams for six innings. The reigning AL Cy Young winner allowed three runs and nine hits.
"I didn't have my best stuff," Lee said. "I had to battle, but we weren't able to get more runs on the board. There's nothing I can do about us scoring runs."
After a rain delay of 1 hour, 25 minutes, the Yankees loaded the bases with one out in the first. Lee then struck out Robinson Cano and Posada to end the threat.
Nick Swisher's sacrifice fly made it 3-0 in the third.
The Indians left 11 men on base and went 0-for-7 with runners in scoring position.
"I thought we were poor offensively," manager Eric Wedge said. "We had the bases loaded twice and scored one run. We chased a lot of bad pitches. We were a little anxious out there."
Lee walked two and struck out five, but fell to 1-4 in his last eight starts. Cleveland has totaled only seven runs in his six losses.
It was the fourth straight game in Cleveland delayed by rain. The delays totaled 6 hours, 32 minutes. ... New York optioned C Kevin Cash to Triple-A Scranton/Wilkes-Barre to make room for Posada. ... Girardi said OF Melky Cabrera (bruised right shoulder) might return Monday. ... C Jose Molina (left quadriceps strain) got seven plate appearances in a simulated game at the Yankees' spring training facility in Tampa, Fla., on Friday. He is scheduled to catch for the first time Saturday. ... Cleveland recalled LHP Rafael Perez from Triple-A Columbus and designated for assignment OF David Dellucci. ...