Manny Machado hit a tying homer in the eighth inning and Tyler Wade scored the winning run on Cade Gibson’s wild pitch in the bottom of the 11th as the San Diego Padres rallied past the Miami Marlins 4-3 on Monday night.

Jose Iglesias had a two-run double in the fourth to begin San Diego’s comeback from a 3-0 deficit. Machado tied it with his leadoff shot to left-center off reliever Calvin Faucher.

Wade, who replaced Machado as the automatic runner at second base, moved to third on a groundout before Gibson (0-2) intentionally walked Xander Bogaerts. The Marlins used an outfielder as a fifth infielder, but Gibson threw a curveball in the dirt on a 1-2 pitch to Jake Cronenworth.

Tigers 3, Giants 1: Keider Montero pitched five scoreless innings and Riley Greene drove in two runs to help Detroit defeat visiting San Francisco.

Montero (2-1) entered the game with a 5.28 ERA in six games, but held the Giants to one hit and two walks while striking out three.

Hayden Birdsong (2-1) took the loss, giving up three runs on five hits and two walks in 4 1/3 innings.

With one out in the fourth, Detroit loaded the bases on a single and two walks before Greene looped a two-run single into center.

Cubs 3, Rockies 1: Jameson Taillon pitched four-hit ball into the seventh inning, Kyle Tucker drove in two runs and NL Central-leading Chicago beat visiting Colorado.

The Rockies lost for the eighth time in nine games, dropping to a major league-worst 9-45.

Taillon (4-3) retired his first 14 batters before Mickey Moniak connected in the fifth, driving a changeup deep to right-center for his fifth homer.

The right-hander struck out seven and walked none in 6 1/3 innings.

Mets 2, White Sox 1: Tyrone Taylor hit a leadoff double in the bottom of the ninth inning and scored on Francisco Lindor’s sacrifice fly as New York mounted a late comeback to edge Chicago.

New York managed just two baserunners through the first six innings against Adrian Houser and left the bases loaded in the seventh before Juan Soto hit a tying sacrifice fly in the eighth.

Edwin Díaz (2-0) tossed a hitless inning for the win as the Mets won their third straight game since dropping six of eight.

Mets starter Clay Holmes gave up one run and four hits while throwing a career-high 102 pitches over 5 2/3 innings.

Rays 7, Twins 2: Jonathan Aranda hit a three-run homer and Danny Jansen added a two-run shot as Tampa Bay extended its winning streak to six games with a home win over Minnesota.

Zack Littell (4-5) allowed three hits through six shutout innings. He left with one out in the seventh after hitting Ty France with his 72nd pitch. Then, Minnesota’s Carlos Correa hit a two-run homer off reliever Garrett Cleavinger, pulling the Twins within 3-2.

Diamondbacks 5, Pirates 0: Eugenio Suárez and Josh Naylor homered to back a stellar start from Ryne Nelson as host Arizona blanked Pittsburgh to end a five-game skid.

Suárez hit his 15th homer for a 3-0 lead against Andrew Heaney (3-4) in the third inning. Suárez also walked with one out in the fifth before Naylor launched his sixth home run.

Nelson (2-1) permitted four hits in 6 2/3 innings as Arizona (27-27) got back to .500. He struck out four and walked none.

Orioles 5, Cardinals 2: Dylan Carlson hit a three-run homer against his former team, Charlie Morton earned his first victory with Baltimore, and the host Orioles achieved their first three-game winning streak of the season, beating St. Louis.

Morton (1-7) took a shutout into the fifth before allowing a two-run shot by Pedro Pagés. The 41-year-old right-hander, who signed with Baltimore in the offseason, allowed four hits in six innings after losing his first six starts of the season.

Reds 7, Royals 4: Nick Martinez worked seven strong innings and Tyler Stephenson homered to lead Cincinnati at Kansas City.

Martinez (3-5) allowed three singles through six shutout innings and finished seven innings allowing three runs on six hits with two strikeouts and no walks.

Brewers 3, Red Sox 2: Jackson Chourio homered on the opening pitch from Garrett Crochet, and Milwaukee won at home over Boston.

The Brewers pushed the lead to 2-0 in the fifth on consecutive doubles by Joey Ortiz and Andruw Monasterio.

Milwaukee starter Chad Patrick pitched 4 2/3 scoreless innings, giving up three hits while walking two and striking out six.

Blue Jays 2, Rangers 1: Kevin Gausman struck out six over eight innings, Daulton Varsho had a solo homer and visiting Toronto edged Texas.

Gausman (5-4) didn’t walk a batter, giving up one run and five hits.