MIAMI (AP) -- Right-handed pitcher Carlos Martinez shook off a slow start and a fastball that hit him in the right shoulder to pitch seven innings and help the St. Louis Cardinals beat the Miami Marlins 4-3 Tuesday.
Martinez (8-3) trailed 3-0 after 1 1-3 innings before settling down. He retired the final seven batters he faced, including three after taking a 94-mph fastball in the shoulder while trying to bunt in the seventh.
Martinez struck out nine and allowed eight hits. He gave up a two-run homer in the first inning to major league home run and RBI leader Giancarlo Stanton, a shot estimated at 484 feet.
That matched Stanton's previous longest this year, and he now has 26 homers, including the longest two in the majors in 2015.
Justin Heyward hit his eighth homer for the Cardinals.
San Diego's Alexi Amarista singled in the go-ahead run as the Padres beat the San Francisco Giants 3-1 in 11 innings.
Brandon Maurer (5-0) pitched two scoreless innings to earn the victory while Craig Kimbrel earned his 18th save.
Derek Norris doubled against Hunter Strickland (0-1) with one out in the 11th and went to third on Justin Upton's single. Amarista's grounder tipped off Strickland's glove and out of the reach of second baseman Joe Panik, allowing Norris to cross the plate.
In Chicago, Chris Denorfia hit a game-ending sacrifice fly in the 10th inning as the Cubs beat the Los Angeles Dodgers 1-0 fir their fourth consecutive victory.
The Cubs loaded the bases with no outs in the 10th on two singles and a walk. Dodgers manager Don Mattingly then replaced Joel Peralta (1-1) with Kenley Jansen and brought the infield in.
Rookie slugger Maikel Franco homered again for the Phillies and had five RBIs for the second straight night at Yankee Stadium, breaking a ninth-inning deadlock with a two-run double that sent Philadelphia to a 11-6 victory over New York.
Franco lofted a three-run shot to the short porch in right field and Cameron Rupp hit his first major league homer for the Phillies, who handed lights-out reliever Dellin Betances his first major league loss in 110 career appearances.
The Seattle Mariners blanked the Kansas City Royals after rookie pitcher Mike Montgomery allowed just four hits against the team that drafted him, and Dustin Ackley singled, doubled and homered for his first three-hit game of the season.
Montgomery (2-2) became the second Mariners pitcher this season to toss a complete game, joining Felix Hernandez, and he became the 10th rookie in Seattle history to toss a complete game. Montgomery retired 17 straight batters at one point, striking out a career-high 10 and allowing only two base runners after the second inning.
Washington's Stephen Strasburg pitched five shutout innings in his return from the disabled list and Anthony Rendon equaled his career-high with four hits as the Nationals defeated the Atlanta Braves 3-1, while Tampa Bay's Chris Archer won his sixth straight decision in the Rays' 3-1 victory over the Toronto Blue Jays.
In other games, Luis Valbuena homered twice and rookie Carlos Correa hit a mammoth three-run shot off C.J. Wilson to lead the Houston Astros to a 13-3 rout of the Los Angeles Angels, the Milwaukee Brewers edged the New York Mets 3-2, the Pittsburgh Pirates outlasted the Cincinnati Reds 7-6 and the Oakland Athletics beat the Texas Rangers 8-6.
Nolan Arenado hit two home runs as the Colorado Rockies downed the Arizona Diamondbacks 10-5, the Baltimore Orioles defeated the Boston Red Sox 6-4, the Detroit Tigers dominated the Cleveland Indians 7-3 and the Chicago White Sox were 6-2 winners over the Minnesota Twins.