Kyle Stowers and Agustín Ramírez each homered and the visiting Miami Marlins beat the San Francisco Giants 12-5 on Thursday to complete a three-game series sweep.

Xavier Edwards had a two-run double for Miami, which has won four straight overall, five of six, and six straight on the road.

Rafael Devers had three hits including a homer and a double for the Giants, who have lost eight of their last 11.

Devers’ homer was his 17th and his second in nine games since being acquired by San Francisco last week.

The Marlins broke a 5-5 tie in the fifth on Eric Wagaman’s two-run double in a three-run inning.

Stowers hit a three-run homer in the first and Ramírez hit a two-run shot in the third — both off Giants starter Hayden Birdsong — to give Miami a 5-0 lead.

Devers hit a two-run homer in the bottom of the third, and the Giants tied it in the fourth when June Hoo Lee’s leadoff triple keyed a three-run inning.

Birdsong (3-2) allowed seven runs and four hits with four walks in four-plus innings.

Mets 4, Braves 0: Pete Alonso had three hits and an RBI and New York overcame the loss of starting pitcher Griffin Canning to injury in the third inning for a home victory over Atlanta and a split of the four-game series.

The Mets, who had lost 10 of 11 games before a 7-3 win over the Braves on Wednesday night, moved back into first place in the NL East, a half-game ahead of the Philadelphia Phillies.

Canning worked 2 2/3 scoreless innings before suffering a left ankle injury while trying to race off the mound. After the game, Mets manager Carlos Mendoza said it “looks like an Achilles injury.” The team said he would undergo imaging to determine the severity of the injury.

After Canning left, four relievers limited the Braves to two hits the rest of the way. Austin Warren (1-0) replaced Canning and threw 2 1/3 one-hit innings.

Tyrone Taylor lofted a sacrifice fly against Grant Holmes (4-7) in the fourth, and Alonso had a run-scoring hit in the fifth. Jeff McNeil added a two-run single in the seventh.

Holmes allowed two runs and six hits while walking three and striking out six over five innings.

Cubs 3, Cardinals 0: Shota Imanaga returned from the injured list to throw five innings of one-hit ball, lifting Chicago at St. Louis for a split of a four-game series.

Michael Busch homered for the NL Central-leading Cubs.

St. Louis was shut out in back-to-back games for the first time this season. Five Chicago pitchers combined on a three-hitter.

A left hamstring strain cost Imanaga (4-2) nearly two months. In his Busch Stadium debut, Imanaga gave up a first-inning single to Masyn Winn and then retired 10 batters before issuing his lone walk.

Daniel Palencia allowed the first two batters to reach before striking out the side in the ninth for his eighth save.

Busch hit a 3-2 fastball from Andre Pallante (5-4) over the wall in right field in the second inning. He scored again in the fourth when Ian Happ drew a four-pitch, bases-loaded walk.

Astros 2, Phillies 1: Cam Smith hit an RBI single in the eighth inning to give Houston a home win over Philadelphia.

The rookie’s hit came off Orion Kerkering (5-3) and gave the Astros their fourth straight win.

Brandon Marsh tied the game on a sacrifice fly in the top of the inning to end the Phillies’ 26-inning scoreless streak.

The Astros took a 1-0 lead on Yainer Diaz’s RBI single in the second inning. They only managed three more hits off Phillies starter Christopher Sanchez, who struck out 11 with zero walks over six innings. Sanchez has not issued a walk in three straight starts.

Hunter Brown lowered his league-best ERA to 1.74 by scattering three singles over seven shutout innings, with nine strikeouts. He did not allow a runner to reach second base.

Tigers 8, Athletics 0: Dietrich Enns pitched five scoreless innings in his return to the majors as Detroit blanked the visiting Athletics.

Enns gave up a single and two walks in his first game since he threw two scoreless innings for the Tampa Bay Rays against the Miami Marlins on Sept. 24, 2021.

The 34-year-old pitched for the Seibu Lions in Japan from 2022-23 before going 13-6 last season for the LG Twins in South Korea.

Jeffrey Springs (5-6) allowed three runs on five hits and two walks in five innings.

Spencer Torkelson and Gleyber Torres homered for the Tigers.

Rays 4, Royals 0: Shane Baz allowed three hits over a career-best eight innings, Brandon Lowe and Junior Caminero hit back-to-back homers in the sixth, and Tampa Bay beat Kansas City for a three-game road sweep.

Baz (8-3) struck out nine and walked one.

Tampa Bay has won five of six to move to a season-high 11 games above .500 (46-35) and a half-game behind the AL East-leading New York Yankees, who were off.

Paul Gervase gave up singles to Jonathan India and Vinnie Pasquantino before Pete Fairbanks came on with one out in the ninth and got Maikel Garcia to ground into a 6-4-3 double play for his 15th save.

Twins 10, Mariners 1: Trevor Larnach homered with three RBIs after Simeon Woods Richardson started with five scoreless innings, and Minnesota won at home over Seattle after a rain delay of 4 hours and 22 minutes.

Brooks Lee led off an eight-run sixth against reliever Zach Pop with a home run. Then came RBI doubles from Byron Buxton and Willi Castro, a two-run single by Carlos Correa and a two-run homer from Matt Wallner

Woods Richardson (3-4) produced a superb follow-up to the six scoreless innings Joe Ryan threw in a 2-0 victory on Wednesday.

Emerson Hancock (3-4) started with four scoreless innings for the Mariners before Larnach’s two-run shot in the fifth.

Blue Jays 6, Guardians 0: Kevin Gausman threw eight innings of two-hit ball, Alejandro Kirk and Nathan Lukes drove in two runs apiece and visiting Toronto defeated Cleveland.

Gausman (6-6) gave up one walk on 104 pitches with six strikeouts.

Guardians starter Tanner Bibee (4-8) gave up three hits and two runs in six innings.