Updated

The Tampa Bay Rays' first trip to Wrigley Field in 11 years was a successful one, even with the disappointing ending.

Cesar Ramos yielded a game-ending RBI single to Anthony Rizzo in the 12th inning, and Tampa Bay lost 3-2 to the Chicago Cubs on Sunday after taking the first two games of the series.

The Rays lost only the fifth time in their last 23 road games and fell 6 1/2 games behind Kansas City in the race for the second AL wild card. But manager Joe Maddon said he enjoyed the trip to the iconic neighborhood ballpark.

"It's staggering, it's so good," Maddon said of the NL brand of ball at Wrigley. "I love it."

The last-place Cubs struck out 17 times, running their total to a team-record 44 for three consecutive games, but Rizzo and touted rookie Javier Baez had two hits apiece to key a 13-hit attack.

"Spectacular," Maddon said of his team's pitching performance.

Baez struck out in the 12th, but reached on a wild pitch that moved Ryan Sweeney to third. Baez moved to second on another wild pitch by Ramos (2-4) before Rizzo lined a single over a five-man infield and into right-center field.

"It was a slider down and way," Ramos said. "I got him out in front, but he's a good hitter."

Carlos Villanueva (5-6) pitched a scoreless inning to earn the victory.

"We had so many opportunities to score more runs," Maddon said. "The wind got us. We could not find a way to score those extra runs."

Tampa Bay grabbed a 2-1 lead in the seventh inning. Pinch-hitter Brandon Guyer got it started with a leadoff single against Neil Ramirez, who returned from the disabled list before the game. Guyer stole second and moved to third on a groundout before Desmond Jennings drove him in with a double.

The Cubs responded with a two-out rally in the bottom half against Grant Balfour. Sweeney doubled and scored on Chris Coghlan's triple.

Rays right-hander Alex Cobb pitched six innings of one-run ball. He allowed six hits, struck out six and walked none.

Travis Wood matched Cobb with a strong performance for the Cubs. The left-hander allowed an unearned run and four hits in six innings, but remains winless in his last 10 starts.

Wood, one of the best hitting pitchers in the majors, also helped himself with a one-out single in the fifth. He moved up on a groundout and scored on Baez's single to center.

Baez's run-scoring hit atoned for an error in the top half that allowed a run to score.

Curt Casali started the inning with a double for the Rays' second hit of the game. Logan Forsythe walked with one out before Jennings hit a slow roller to second base. The charging Baez retrieved the ball in time to make the play, only to have his off-balance throw sail wide of first base.

HIS BAD

Casali accepted the blame for the wild pitch that allowed Baez to reach.

"There's no excuse," Casali said. "I should have blocked that ball. ... That's what happens when I make a poor decision like that, trying to pick it as opposed to block it."

BEN THERE, DONE THAT

Tampa Bay's Ben Zobrist had two walks and a single in five plate appearances. He reached base nine times in the series.

TRAINER'S ROOM

Rays: After a rainout the previous night. Wil Myers began his rehab assignment with Triple-A Durham on Sunday. The outfielder had a single and two strikeouts as the designated hitter in the first game of a doubleheader. He had been out with a fractured right wrist.

Cubs: Reliever Brian Schlitter was placed on the 15-day disabled list because of an inflamed right shoulder.

ON DECK

Rays left-hander Drew Smyly (6-10) is scheduled to open a four-game series at Texas on Monday night. Cubs right-hander Jake Arrieta (6-3) will take the mound for the start of a four-game set versus the Brewers on Monday.