ST. PETERSBURG, Fla. -- Joe Maddon perused the box score and wondered aloud how the latest stellar pitching performance by James Shields only improved the Tampa Bay All-Star's record to one game over .500.
"How's that possible?" Maddon asked after the 29-year-old right-hander won for the first time in nearly a month, outpitching CC Sabathia and beating the New York Yankees 2-1 on Thursday night. "You see Sabathia is 14-5. That's what Shields' record should look like."
Shields (9-8) allowed six hits, walked three and struck out six over 7 2/3 innings in his second duel with Sabathia in 12 days. He lost 1-0 to the major leagues' wins leader on July 10 at Yankee Stadium, yielding the game's only run on an errant pickoff throw to third base.
Run support for Shields, whose 17 starts of at least seven innings are tied for the most in the major leagues, has been an issue much of this season.
The Rays have scored two runs or less in 10 of his 21 starts. In his nine wins Shields has yielded six earned runs in 76 innings -- an ERA of 0.71.
"That was a good battle. It's nice to come out with a win, especially after what happened last time we faced each other in New York," Shields said. "Any time you face CC, you're going to go through a battle. Fortunate for us, we got just enough runs to win the ballgame."
Pitching on his 31st birthday, Sabathia (14-5) lost for the first time since June 9, ending a streak of victories in seven consecutive starts. Slumping Evan Longoria homered and finished with two of the five hits off the Yankees ace. Sam Fuld drove in Tampa Bay's second run with a fifth-inning triple.
"When you look at his night, he really only made two mistakes. The curveball to Longoria and the slider to Fuld and that was it," Yankees manager Joe Girardi said. "Unfortunately we only got one tonight."
The loss dropped New York two games behind first-place Boston in the AL East. The third-place Rays salvaged a split in the four-game series, but only went 4-6 in a critical stretch of 10 straight games against the Red Sox and Yankees and are 5 1/2 games behind New York.
Shields ended a personal four-game skid, winning for the first time since a 5-1 complete-game victory at Houston on June 24. He allowed one runner past first until the eighth, when Derek Jeter doubled for career hit No. 3,010 and scored on Robinson Cano's double into the right-field corner.
Brandon Gomes replaced Shields and got Nick Swisher to hit a first-pitch fly ball to center to end the eighth. Kyle Farnsworth worked the ninth for Tampa Bay, earning his 19th save in 22 opportunities.
The Rays played three games at Yankee Stadium leading into the All-Star break. Thursday night finished a seven-game homestand in which they went 3-4 against the teams they're chasing in the division.
Maddon felt his team proved it can go "toe to toe" with the Red Sox and Yankees.
"I think they know that. We definitely know that," Maddon said. "Moving forward, in order to beat them we've got to continue to play this kind of game but supply a little bit more offense. ... At the end of the day, both sides know, again we go toe to toe with these guys. That's a good thing for our confidence."
Longoria began the night just 4-for-31 in his previous eight games. He hit his 12th homer with two outs in the first, added an infield hit in the fourth and finished 2-for-2 with two walks -- one intentional.
Sabathia walked four and struck out eight en route to his third complete game of the season. The left-hander felt he pitched better than he has in some of his victories.
"It's one of those of things," Sabathia said. "It's baseball."
Girardi tweaked his batting order for the game, moving Brett Gardner from ninth to leadoff and dropping Jeter from first to second. The change was made in part because regular No. 2 hitter Curtis Granderson was not in the starting lineup after fouling a ball off his right calf and being hit in the back with a pitch on Wednesday night.
Jeter's double lifted him into a tie with Hall of Famer Wade Boggs for 25th on the career hits list. Granderson entered the game as a pinch hitter in the seventh and played the last three innings in center field.
Before Longoria went deep, New York pitchers had gone eight consecutive games without allowing a home run -- the longest such streak for the Yankees since another eight-game homerless stretch in 1999. Sabathia hadn't yielded one since June 19, at home against the Chicago White Sox, a span of five starts.
Rays RHP Wade Davis (right forearm strain) was activated from the 15-day DL after the game and will start the opener of a weekend series at Kansas City on Friday. RHP Dane De La Rosa was optioned to Triple-A Durham. ... Girardi said 3B Alex Rodriguez, who had right knee surgery on July 11, had the stitches removed and continues working out in a pool. ... New York RHP Rafael Soriano pitched one inning in his second appearance with Class-A Tampa, allowing one run and two hits, and INF Eric Chavez (broken left foot) played defense for the first time in the same game. Both could rejoin the team next week. ... Yankees INF Ramiro Pena was released from a hospital Wednesday, two days after having an appendectomy.