Mark Teixeira replayed the ground ball in his mind, then reviewed it on video. And the slick-fielding first baseman still wasn't sure what happened on his rare error that cost the New York Yankees a game.

"I really don't know. I tried to look, but it was one of those after it goes by you, you go what just happened? I didn't even get leather on it," Teixeira said after his first error of the season allowed the winning run to score in a 4-3 loss to the Tampa Bay Rays on Monday night.

B.J. Upton and Carlos Pena homered and the Rays scored twice in the seventh inning to rally past the AL East leaders and halt a two-game slide that dropped them a season-high 7½ games behind the Yankees in the division.

Pinch-hitter Brooks Conrad delivered a tying RBI double with two outs in the seventh inning against David Robertson (0-3).

Teixeira then misplayed Elliot Johnson's sharp grounder over first base for his first error in 671 chances this year, enabling Conrad to score the go-ahead run. Teixeira shook his head after the ball scooted under his glove, allowing Johnson to reach third.

"Usually you can knock it down. I tried to look at video, but I couldn't really even tell what happened," he said. "I just missed it. I don't know if it hit the back of the base or the chalk or what. I still have to knock it down. That's the disappointing thing."

"Usually if you get a bad hop you can just try to knock it down, but I didn't get it. I just missed it. I don't know what happened," he added. "The ball, obviously, didn't do what I expected it to do. It's very tough. I take a lot of pride in saving runs for our team, but I gave one back tonight."

Matt Moore (5-5) allowed three runs while scattering nine hits over seven innings to win his fourth straight decision for the Rays, who have defeated the Yankees eight consecutive times at Tropicana Field dating to July 2011.

Conrad has appeared in 11 games since being claimed off waivers from Milwaukee. Manager Joe Maddon sent him to the plate, unaware that the switch-hitting infielder had gone 0 for 24 in pinch-hitting situations since he last came up with a hit in such a spot for Atlanta on Sept. 4, 2011.

"Mostly what I've done at this level is going out there and being a pinch hitter with Atlanta, so I have a lot of experience with it the last couple years," Conrad said.

"It's fun. You get up there in those big spots, but also it's a really tough spot coming in there and facing some of the best arms in the game, the best bullpen guys in the game. But I think it's fun to be in those spots."

Upton and Pena hit solo homers off right-hander Freddy Garcia, filling in for the injured Andy Pettitte in a New York rotation also missing CC Sabathia.

Joel Peralta worked a perfect eighth for Tampa Bay, and All-Star Fernando Rodney finished for his 23rd save in 24 opportunities.

Teixeira, Robinson Cano and Curtis Granderson each drove in a run for the Yankees. Granderson's seventh-inning sacrifice fly made it 3-2.

Robertson, who has received a loss in his last two appearances against Tampa Bay, claimed responsibility for letting this one slip way.

"I've got to come in and get one out. I've got a runner on second. I blew it there. I blew the game," Robertson said, adding that he didn't fault Teixeira for not coming up with the ground ball that would have gotten the Yankees out of the seventh.

"I feel like that one is not on Tex. He's made amazing plays behind us all year long," he said. "It's going to happen, but I still should have been able to get Conrad out. That one falls on me."

Garcia made four starts before being moved into the bullpen after allowing six runs in 1 2-3 innings of a 7-5 loss to Detroit. The right-hander returned to the rotation to fill in for Pettitte, who was placed on the 60-day disabled list after he fractured a bone in his left leg when he was hit by a batted ball against Cleveland on June 27.

New York scored twice in the first with help from Hideki Matsui, the former Yankees star who overran Teixeira's routine fly to right field that dropped for a RBI double. Alex Rodriguez singled, sending Teixeira to third before Cano lined a single up the middle to stake Garcia to a quick 2-0 lead.

Moore escaped further damage by getting Nick Swisher to hit into an inning-ending double play.

Yankees manager Joe Girardi said before the game that Garcia, who had made 10 appearances out of the bullpen since being removed from the rotation, would be limited to 75 pitches. Pena, who is 5 for 42 lifetime against the right-hander, homered on Garcia's 74th — and last — pitch.

Garcia allowed two runs and five hits in 5 1-3 innings.

"Really good job by Freddy. For not making a start in a long time, I thought he did a tremendous job," Girardi said.

NOTES: Matsui left in the second inning due to left hamstring tightness. ... New York RHP Joba Chamberlain is progressing toward pitching in a minor league game for the first time since dislocating his right ankle bouncing on a trampoline in March. The reliever threw a pair of 20-pitch segments Monday during a batting practice session at the team's minor league complex in Tampa. He said he's scheduled to throw a simulated game on Friday. ... Sabathia, who strained his left groin on July 24, felt good after he resumed throwing Monday. ... Rays RHP Jeremy Hellickson, who left his most recent start after being hit in the right shin by a line drive off the bat of Prince Fielder, threw a bullpen session and expects to make his next scheduled start on Thursday at Cleveland. ... Yankees RHP David Aarsdma is undergoing tests after feeling discomfort in his surgically repaired right elbow. The reliever pitched in three Gulf Coast League games before being shut down.