ST. PETERSBURG, Fla. -- Derek Jeter got the biggest of the Yankees' key two-out hits.
With the bases loaded and two outs, Jeter lined a 3-2 pitch from Travis Harper to right for a 6-4 lead. He had only three hits in his previous 21 at-bats against Harper.
"I guess I was due then," Jeter said. "Every time is a different situation. Those are big ... you've got to find ways to come through. Those are situations you have to come through because two-out hits are pretty clutch."
All the Yankees' runs came on two-out hits.
"We're gritty right now," New York manager Joe Torre said. "We're grinding through games an inning at a time."
Owner George Steinbrenner watched from a suite as his Yankees (82-62) moved a season-high 20 games over. 500 to remain 2½ games behind first-place Boston in the AL East and one back of Cleveland in the wild-card race.
"We've been playing well," Jeter said. "This part of the season, it's just like in the playoffs. Every game you play is a big game."
New York won the first two of a three-game set after losing its four previous series against the Devil Rays, who are 11-7 against the Yankees this year.
The Yankees' 17-3 victory Tuesday night marked the third time this season New York scored at least 17 runs in beating the Devil Rays. However, the Yankees lost the next day to Tampa Bay following both a 19-8 win on April 18 and a 20-11 victory on June 21.
Chien-Ming Wang (7-4) allowed five runs and nine hits in 6 1/3 innings for his first win since July 8 against Cleveland. This was his second start since missing two months with a shoulder injury.
Mariano Rivera, the fourth Yankees reliever, worked the ninth for his 38th save in 42 opportunities. Julio Lugo walked with two outs and tried to steal second with Carl Crawford batting but was cut down by catcher Jorge Posada on a pitchout.
"Having Mariano on the mound really helps because you know he's going to throw strikes," Posada said. "We took a gamble."
Yankees pitching coach Mel Stottlemyre called for the pitchout from the dugout.
Crawford went 2-for-4 with two RBI, including a run-scoring grounder that pulled Tampa Bay to 6-5 in the seventh. He is hitting .420 (34-for-81) against the Yankees this season.
"We were going to run somewhere in that sequence," Tampa Bay manager Lou Piniella said. "That's how we play."
Robinson Cano drove in two runs with a bases-loaded single in the fifth to put the Yankees up 4-2. Cano, who popped out before Jeter's go-ahead hit in the seventh, is 2-for-17 with the bases loaded this season.
The Devil Rays responded with two runs in the bottom of the fifth on Crawford's RBI triple and a run-scoring grounder by Jorge Cantu.
The Yankees threatened to take a commanding lead in the first for the second straight day, but were held to one run when Bernie Williams struck out with the bases loaded and two outs. New York's 1-0 lead came on an RBI double by Hideki Matsui.
Alex Rodriguez made it 2-0 with a run-scoring single in the fourth. The hit came one batter after shortstop Lugo was charged with an error for misplaying Jeter's two-out grounder.
"We battled," Piniella said. "It was a good ballgame. We just beat."
Tampa Bay starter Mark Hendrickson went five innings, allowing four runs and eight hits. He was looking to become the first pitcher to beat the Yankees four times in one season since Chuck Finley in 1996. The left-hander said New York was more patient than in earlier meeting this season.
"That's more the team I'm accustomed to facing," Hendrickson said. "It seemed like every inning was a battle."
Reliever Chad Orvella (3-3) gave up two runs, one hit and two walks in 1 1/3 innings.
- Cantu left in the seventh after being hit on the left elbow by a pitch. X-rays were negative. "At the time he had no feeling in his forearm," Piniella said. "He's OK."
- The previous team to score 17 or more runs three times against one opponent during a season was the 1939 Yankees. New York beat the Philadelphia Athletics 23-2, 18-4 and 21-0 that season.
- Tampa Bay pitching coach Chuck Hernandez was back in uniform after missing Tuesday's game with flulike symptoms.