Chad Pinder and Marcus Semien homered in a six-run fifth inning, and the Oakland Athletics rallied to beat the St. Louis Cardinals 7-3 Tuesday night.

Matt Olson also went deep to help Oakland win for the sixth time in eight games.

More Images
Oakland Athletics' Chad Pinder runs the bases after hitting a two-run home run during the fifth inning of the team's baseball game against the St. Louis Cardinals on Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

Chad Pinder and Marcus Semien homered in a six-run fifth inning, and the Oakland Athletics rallied to beat the St. Louis Cardinals 7-3 Tuesday night.

Marcus Semien, right, is congratulated by third base coach Matt Williams (4) as he runs the bases after hitting a solo home run during the fifth inning of the team's baseball game against the St. Louis Cardinals on Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

Josh Phegley opened the inning with a ground-rule double, and Pinder homered to left to tie the score. Semien followed with his shot to center to put Oakland ahead 4-3. The A's scored three more runs on three singles — including Stephen Pisciotty's run-scoring hit — and pinch-hitter Khris Davis' two-run double off reliever John Brebbia.

Oakland Athletics relief pitcher J.B. Wendelken throws during the fourth inning of the team's baseball game against the St. Louis Cardinals on Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

The Athletics went ahead 1-0 in the second when Olson led off with a home run to left field.

Oakland Athletics' Khris Davis smiles while standing on second base after hitting a two-run double during the fifth inning of the team's baseball game against the St. Louis Cardinals on Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

FOUL BALL

St. Louis Cardinals right fielder Dexter Fowler is unable to catch a home run hit by Oakland Athletics' Marcus Semien during the fifth inning of a baseball game Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

The Cardinals recalled right-handed pitchers Daniel Ponce de Leon and Dominic Leone from Triple-A Memphis on Tuesday. Left-handed pitcher Génesis Cabrera was optioned to Memphis.

Oakland Athletics center fielder Ramon Laureano is unable to make a catch resulting in a two-run triple by St. Louis Cardinals' Matt Carpenter during the second inning of a baseball game Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

Cardinals: RHP pitcher Jordan Hicks (right elbow) has been placed on the 10-day Injured List, retroactive to June 23. ... RHP Alex Reyes (strained pectoral muscle) will miss two to three starts at Triple-A Memphis. The oft-injured Reyes has a 7.39 ERA in 28 innings for Memphis this season.

St. Louis Cardinals' Paul DeJong gestures toward the dugout after hitting an RBI double during the second inning of the team's baseball game against the Oakland Athletics on Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

Cardinals: RHP Adam Wainwright (5-6, 4.50) will be making his third career start against Oakland. He won the previous two, going eight innings or more in each game.

Oakland Athletics' Matt Olson, left, is congratulated by Jurickson Profar after hitting a solo home run during the second inning of the team's baseball game against the St. Louis Cardinals on Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

Oakland Athletics' Matt Olson, left, is congratulated by Jurickson Profar after hitting a solo home run during the second inning of the team's baseball game against the St. Louis Cardinals on Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

Oakland Athletics starting pitcher Chris Bassitt delivers during the first inning of the team's baseball game against the St. Louis Cardinals on Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

Oakland Athletics starting pitcher Chris Bassitt delivers during the first inning of the team's baseball game against the St. Louis Cardinals on Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

Tha A's, who had totaled nine runs over their last three games, overcame a 3-1 deficit with the big fifth inning to knock out Cardinals starter Jack FLaherty (4-5).

Oakland Athletics' Chad Pinder runs the bases after hitting a two-run home run during the fifth inning of the team's baseball game against the St. Louis Cardinals on Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

Oakland Athletics' Chad Pinder runs the bases after hitting a two-run home run during the fifth inning of the team's baseball game against the St. Louis Cardinals on Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

Josh Phegley opened the inning with a ground-rule double, and Pinder homered to left to tie the score. Semien followed with his shot to center to put Oakland ahead 4-3. The A's scored three more runs on three singles — including Stephen Pisciotty's run-scoring hit — and pinch-hitter Khris Davis' two-run double off reliever John Brebbia.

Flaherty gave up a season-high seven runs and nine hits and a walk in 4 2/3 innings. He gave up three homers to raise his total to nine allowed in five June starts. Overall, Flaherty has given up 18 homers in 16 starts this season.

J.B. Wendelken (1-1) picked up his first MLB victory after spending time with Oakland in parts of three seasons. He got the final two outs of the fourth inning and was lifted for a pinch-hitter in the bottom of the fifth.

Marcus Semien, right, is congratulated by third base coach Matt Williams (4) as he runs the bases after hitting a solo home run during the fifth inning of the team's baseball game against the St. Louis Cardinals on Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

Marcus Semien, right, is congratulated by third base coach Matt Williams (4) as he runs the bases after hitting a solo home run during the fifth inning of the team's baseball game against the St. Louis Cardinals on Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

The Athletics went ahead 1-0 in the second when Olson led off with a home run to left field.

The Cardinals went ahead with a three-run second. Matt Carpenter tripled with two outs, driving in Yadier Molina and Kolten Wong. He hit a deep fly to center and Ramon Laureano fell down after turning the wrong way on the ball. It landed just in front of the wall and Laureano for Carpenter's second triple this season. He scored on a double by Paul DeJong for a 3-1 lead.

Oakland's Chris Bassitt was lifted for a reliever after 3 1/3 innings. It was his shortest stint in his 12 starts this season. He allowed three runs and four hits with four walks.

Oakland Athletics relief pitcher J.B. Wendelken throws during the fourth inning of the team's baseball game against the St. Louis Cardinals on Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

Oakland Athletics relief pitcher J.B. Wendelken throws during the fourth inning of the team's baseball game against the St. Louis Cardinals on Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

FOUL BALL

Cardinals RF Jose Martinez fouled off eight consecutive pitches before striking out in a 12-pitch at-bat to end the first inning with two men on base. Bassitt made 34 pitches in the inning.

ROSTER MOVES

Oakland Athletics' Khris Davis smiles while standing on second base after hitting a two-run double during the fifth inning of the team's baseball game against the St. Louis Cardinals on Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

Oakland Athletics' Khris Davis smiles while standing on second base after hitting a two-run double during the fifth inning of the team's baseball game against the St. Louis Cardinals on Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

The Cardinals recalled right-handed pitchers Daniel Ponce de Leon and Dominic Leone from Triple-A Memphis on Tuesday. Left-handed pitcher Génesis Cabrera was optioned to Memphis.

TRAINER'S ROOM

Athletics: LHP Sean Manaea (shoulder) has been shut down with no timetable on his return. He has soreness on his right side. He threw 60 pitches in a simulated game last Thursday. ... C Chris Herrmann (right knee) will catch back-to-back games in a rehab assignment in Las Vegas before he will be activated from the injured list. ... RHP Jharel Cotton (right hamstring) was scheduled to throw a bullpen session Tuesday.

St. Louis Cardinals right fielder Dexter Fowler is unable to catch a home run hit by Oakland Athletics' Marcus Semien during the fifth inning of a baseball game Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

St. Louis Cardinals right fielder Dexter Fowler is unable to catch a home run hit by Oakland Athletics' Marcus Semien during the fifth inning of a baseball game Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

Cardinals: RHP pitcher Jordan Hicks (right elbow) has been placed on the 10-day Injured List, retroactive to June 23. ... RHP Alex Reyes (strained pectoral muscle) will miss two to three starts at Triple-A Memphis. The oft-injured Reyes has a 7.39 ERA in 28 innings for Memphis this season.

UP NEXT

Athletics: RHP Daniel Mengden (1-1, 5.09) is being recalled from Triple-A Las Vegas for his second stint with the A's this season. Mengden is taking the roster spot of Frankie Montas, who was suspended for 80 games for violating the MLB performance enhancing drug policy.

Oakland Athletics center fielder Ramon Laureano is unable to make a catch resulting in a two-run triple by St. Louis Cardinals' Matt Carpenter during the second inning of a baseball game Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

Oakland Athletics center fielder Ramon Laureano is unable to make a catch resulting in a two-run triple by St. Louis Cardinals' Matt Carpenter during the second inning of a baseball game Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

Cardinals: RHP Adam Wainwright (5-6, 4.50) will be making his third career start against Oakland. He won the previous two, going eight innings or more in each game.

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports

St. Louis Cardinals' Paul DeJong gestures toward the dugout after hitting an RBI double during the second inning of the team's baseball game against the Oakland Athletics on Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

St. Louis Cardinals' Paul DeJong gestures toward the dugout after hitting an RBI double during the second inning of the team's baseball game against the Oakland Athletics on Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

Oakland Athletics' Matt Olson, left, is congratulated by Jurickson Profar after hitting a solo home run during the second inning of the team's baseball game against the St. Louis Cardinals on Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

Oakland Athletics' Matt Olson, left, is congratulated by Jurickson Profar after hitting a solo home run during the second inning of the team's baseball game against the St. Louis Cardinals on Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

Oakland Athletics starting pitcher Chris Bassitt delivers during the first inning of the team's baseball game against the St. Louis Cardinals on Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)

Oakland Athletics starting pitcher Chris Bassitt delivers during the first inning of the team's baseball game against the St. Louis Cardinals on Tuesday, June 25, 2019, in St. Louis. (AP PhotoScott Kane)