St. Louis Cardinals center fielder Peter Bourjos dives and catches a ball hit by Tampa Bay Rays’ Desmond Jennings for an out to end the top of the eighth inning on Tuesday in St. Louis.

AFP/Los Angles

The Tampa Bay Rays knocked out St. Louis ace Adam Wainwright after just 4 2/3 innings, as the Rays extended their season-high winning streak to six games with a 7-2 win over Cardinals on Tuesday.

In his first start since the All-Star break and looking for his Major League-best 13th win, Wainwright (12-5) gave up six hits and six runs. He walked four, including three in the fifth, struck out four and hit a man in his second-shortest outing of the year.

Six different players knocked in runs for Tampa Bay, with third baseman Evan Longoria capping the scoring with a two-out solo homer in the ninth.

The Rays (48-53) jumped over Boston into fourth place in the tightly bunched American League East, seven games behind front-running Baltimore.

The Cardinals (54-46) dropped 1 ½ games behind first-place Milwaukee.

“That fifth inning was a train wreck,’’ Wainwright said. ‘’It’s hard to explain things weird like that happening. Every now and then, you have a really crazy inning like that.’’

Elsewhere, Ike Davis had three hits, including his first home run since June 9, and Gregory Polanco and Neil Walker also homered and drove in three runs each as the Pittsburgh Pirates outlasted the Los Angeles Dodgers.

Polanco, the rookie right fielder, and Walker, the second baseman, each had two of the Pirates’ (53-47) 12 hits as did left fielder Travis Snider and catcher Russell Martin. Davis and Martin had two RBIs apiece.

Los Angeles (56-46) got a home run from Adrian Gonzalez and two hits from Matt Kemp.

Jose Reyes and Dioner Navarro homered in the sixth inning and J.A. Happ pitched six shutout innings as the Toronto Blue Jays defeated the Boston Red Sox 7-3.

The Blue Jays (52-49) snapped a five-game winning streak by the Red Sox (47-53) by taking the second game of the four-game series.

Happ (8-5) held the Red Sox to seven hits, one walk and no runs while striking out four in six innings.

Second baseman Donovan Solano had a career-best four hits, Jacob Turner was successful in his return to the rotation, and the Marlins held on for a 6-5 victory.

Turner, banished to the bullpen in early June, allowed four hits and two runs in five innings as the Marlins (47-52) held off the Braves (54-46).

The Cleveland Indians got four hits from first baseman Carlos Santana in a 8-2 win over the Minnesota Twins.

Cleveland (51-49) right-hander Danny Salazar allowed one run on six hits and three walks in five innings, earning the win and improving to 2-4.

Jonathan Lucroy hit two home runs, including a walk-off, solo shot in the ninth inning, and the Milwaukee Brewers rallied for a 4-3 victory over the Cincinnati Reds.

The Brewers (56-45) earned their second win in a row, while the Reds (51-49) took their season-worst fifth consecutive loss.

Mike Moustakas hit two home runs, helping the Kansas City Royals snap a four-game losing streak.

The Royals (49-50), who hadn’t won since the All-Star break, scored four runs in the sixth inning and amassed 14 hits in a 7-1 win against the Chicago White Sox (48-53) on a hot, muggy night.

Chase Headley came through in his fourth at-bat as a Yankee, hitting a game-winning single in the 14th inning as New York outlasted the Texas Rangers.

Headley was traded to the Yankees from the San Diego Padres earlier in the day, and enjoyed a storybook debut.

The switch-hitting third baseman was hitless in his first three at-bats for New York (51-48), but ended the 4-hour, 51-minute marathon with one swing.

L.J. Hoes lined a tie-breaking solo home run with one out in the top of the 12th inning, and the Houston Astros held on for a victory against the Oakland A’s.

Astros (42-58) right-hander Chad Qualls pitched a perfect 12th for his 11th save of the season.

The first-place A’s (61-38) remained two games ahead of the Los Angeles Angels in the American League West.