NEW YORK -- Andy Pettitte didn't get to put a 'W' next to his name after Tuesday night's game, but the Yankees couldn't have won it without him.

Pitted against Toronto ace Roy Halladay, Pettitte spent his seven frames on the mound dueling with the right-hander, though neither could overcome the other. Both left the game after giving up one run each over seven sharp innings.

After Pettitte was lifted, Kyle Farnsworth, Brian Bruney and Luis Vizcaino pitched the next three innings in what ended as a 3-2 Yankees victory.

It was Pettitte, however, who set the table.

"Andy made it all possible," manager Joe Torre said. "That's the only way you're going to go up against Halladay and have the chance to do that -- you have to match him."

From the very beginning of the game, Pettitte did match his counterpart. Both threw long first innings -- more than 25 pitches each -- but settled down as the game went on.

Pettitte threw 116 pitches on the night, the most he has thrown in a single game all year, while Halladay threw 112. Pettitte also recorded a season-high seven strikeouts and walked three.

That didn't tire the left-hander, though, who was still raring to go when he left the game.

"Really, to tell you the truth, I don't know why, but the last couple of innings I felt real strong," Pettitte said. "Usually, you start feeling a little fatigued, but really in the sixth and even in the seventh, I came to the dugout and said, 'Man, I feel strong.' I would have loved to have went back out."

It took Pettitte a few innings to get to that point.

A shaky first two innings earned him a scolding on his mechanics from pitching coach Ron Guidry, and Pettitte spent time talking with catcher Jorge Posada in between frames to help get into a rhythm.

"The first two innings were kind of a battle with myself, almost like, 'Here we go again,'" Pettitte said. "It was good to get in a good rhythm and I felt like me and Jorgie got going together and got the ball down. I felt like I had decent stuff."

Pettitte said it has taken him into the third inning to find his groove lately. That's where he found it on Tuesday night.

"I think more than anything, I found a decent arm slot. I found good rhythm," Pettitte said. "When you have a good arm slot and you feel comfortable where the ball is coming out, it helps you feel a little bit stronger later in the game."

Halladay allowed the Yankees one run off five hits, striking out six and walking three. And although neither he nor his team corraled a victory, Halladay said he enjoyed going head-to-head with Pettitte.

"It's fun to compete, especially in close games like that," Halladay said. "It's a challenge and it's something you look forward to. Obviously, you want to come out on the winning end, but it's fun to compete against guys like that, especially when they're pitching well."

Toronto manager John Gibbons couldn't help but agree.

"Both of them pitched very good," Gibbons said. "Two of the best veteran pitchers out there, and it was a heck of a ballgame."