ST. LOUIS -- Manager Joe Maddon is confident in the Tampa Bay Rays.

"The boys have their swagger back," he said Tuesday night after his team beat the St. Louis Cardinals. "We are one of the best teams in the American League."

Wednesday night's series finale did little to change Maddon's mind.

Right-hander Alex Cobb tossed seven shutout innings and knocked in the only run Tampa Bay needed as the Rays swept a two-game interleague series with a 3-0 decision at sold-out Busch Stadium.

Cobb (6-6) allowed five hits and whiffed 10 with no walks as Tampa Bay (49-53) swept a two-city road trip for the first time in its 17 seasons. The Rays won three games in Minnesota to start the trip.

It was also the eighth consecutive road victory for Tampa Bay, which moved within 4 1/2 games of the Seattle Mariners for the American League's second wild-card spot.

"Great vibe in the dugout," Maddon said. "We just played well. The only thing we didn't do well was we left too many runners on, but that's going to happen.

"Cobb had great fastball command, and he worked his changeup off it."

St. Louis (54-47) got just two runners into scoring position off Cobb, whose best work occurred in the sixth after third baseman Matt Carpenter stroked a leadoff double and moved to third on a sacrifice bunt by second baseman Kolten Wong.

With the infield in, Cobb induced a grounder to third from left fielder Matt Holliday, and Evan Longoria easily threw out Carpenter at home. First baseman Matt Adams bounced back to the mound, and that was it for the Cardinals.

Cobb closed his 104-pitch outing in style, getting center fielder Jon Jay to look at a called third strike on the inside corner.

"Hands down, tonight's the most comfortable I've felt," Cobb said. "When my mechanics are right, all my pitches play off each other. The fastball stays down in the zone and the changeup stays on the same plane."

Jay said of Cobb, "He dominated us tonight."

Cobb also contributed offensively with the first hit of his major league career, lining a double down the right field line in the top of the second off Lance Lynn (11-7) to score shortstop Yunel Escobar with the game's first run.

Cobb's second time up was a lot more painful, as he took a fastball off his pitching elbow.

"Honestly, I thought I had a broken elbow for a moment," he said.

After a few minutes to regain his bearings, Cobb stayed in the game and kept on dealing until Maddon pinch-hit for him in the eighth. Brad Boxberger fanned two in the eighth, and Jake McGee struck out the side in the ninth for his 15th save.

Rays center fielder Desmond Jennings went 3-for-5, scoring two runs. Longoria knocked him in with a sacrifice fly in the seventh, and left fielder Brandon Guyer singled home Jennings in the ninth.

Lynn failed in his bid to forge a three-way tie for the National League lead in wins despite pitching a solid game. Lynn allowed six hits and two runs (one earned) in 6 1/3 innings, issuing three walks and striking out seven.

It was the third consecutive loss for the Cardinals, who fell into a second-place tie with the Pittsburgh Pirates in the National League Central. Both teams are 2 1/2 games behind the Milwaukee Brewers.

"It's just baseball," Jay said. "It's just a couple of bad games here and there. We're right where we want to be."

Among the few lowlights for Tampa Bay was Escobar getting booted in the fourth after arguing a called third strike. The shortstop jumped up and down and then confronted plate umpire Dan Bellino. It was Bellino's major-league-high sixth ejection of the year.

NOTES: St. Louis activated LHP Kevin Siegrist (left forearm strain) from the 15-day disabled list and optioned LHP Nick Greenwood to Triple-A Memphis. Siegrist was 1-1 with a 3.60 ERA in 23 games before he was injured May 23 in Cincinnati. ... Tampa Bay 3B Evan Longoria's ninth-inning homer Tuesday night gave him 593 career RBIs, breaking the franchise record of 592 set by Carl Crawford. Longoria drove in another run Wednesday. ... Cardinals manager Mike Matheny announced that RHP Shelby Miller would return to the rotation Saturday against the Cubs in Chicago, with RHP Carlos Martinez going back to the bullpen. Martinez made seven starts but lasted only four innings in each of his past two outings.