CHICAGO -- Henderson Alvarez did it all for the Miami Marlins on Monday afternoon.
The 23-year-old right-hander rebounded from a rocky first inning to work six full innings and went 2-for-2 at the plate with his first big league homer as the Marlins topped the host Chicago Cubs 4-3.
Alvarez even got the home run ball back as a keepsake after a fan threw it back.
"You talk about a pitcher having a day," Miami manager Mike Redmond said. "He gives us six innings, hits a three-run homer and another base hit and then strains his hamstring. That's leaving it all out on the field."
The victory was the second straight for Miami following a six-game losing streak. Chicago saw a two-game winning streak snapped.
Alvarez (3-3) worked six full innings in his 11th start before departing with a tight right hamstring. He allowed three earned runs on seven hits while walking one and striking out three.
The Marlins trailed 3-1 in the second inning when Alvarez put Miami ahead with his home run, a first-pitch shot off Cubs left-hander Travis Wood.
Wood (8-11) pitched through the seventh inning. He gave up four earned runs on nine hits, walked two and struck out three.
"I saw (Alvarez's) averages coming up and I knew he was going to be swinging, and I just missed with a pitch and he did what he needed to do with it," Wood said. "(But) it's early in the ballgame and there's a lot of ballgame left, so I just tried to go out and keep it close."
After a combined seven runs scored in the first 1 1/2 innings, the game settled into a run of scoreless frames.
Miami took a 1-0 lead in the first when Christian Yelich launched Wood's 3-2 pitch to the right-field bleachers for his third home run of the season.
The Cubs replied with four straight singles and a Nate Schierholtz sacrifice fly to open a 3-1 lead on Alvarez in the bottom of the first. Anthony Rizzo and Dioner Navarro also collected RBIs with their hits.
"I started the first inning leaving pitches up a little bit," Alvarez said. "But then I made an adjustment in the second inning ... It was pretty much pitching down in the zone. It was pretty much location of pitches."
He made up for the poor first in the next inning, erasing the Cubs' lead with his homer into the wind that scored Ed Lucas and Jeff Mathis for a 4-3 lead.
"As soon as I hit it I knew it was gone," said Alvarez, who last hit a home run earlier this summer in a Double-A rehab assignment. "I was more worried about it being fair than it going over the fence."
In the fourth, the Cubs had Ryan Sweeney at second and Junior Lake at first with none out, but Darwin Barney grounded into a double play and Wood flew out to center.
Miami threatened in the seventh with runners at first and second with one out, but Wood closed his final inning by striking out Giancarlo Stanton and getting Justin Ruggiano to pop to short left to escape the inning.
"It was a funny outing (for Wood)," Cubs manager Dale Sveum said. "He couldn't get the left-handed batter out in their lineup and he couldn't get the pitcher out. Other than that, he dominated the rest of the lineup."
After Alvarez departed in the seventh, left-hander Mike Dunn entered in relief and worked 1 1/3 inning. Chad Qualls got the call in the eighth with one out and a runner on first, and he got the next two batters out.
Marlins right-hander Steve Cishek faced three batters in a scoreless ninth for his 29th save.
NOTES: The Cubs could make more personnel moves on Tuesday following the conclusion of their Iowa Triple-A affiliate's season. On Sunday, they activated RHP Alberto Cabrera from Iowa and Sweeney and IF Luis Valbuena from the disabled list. ... Two Cubs minor league teams open post-season play Tuesday. Class A Daytona hosts Dunedin (Fla.) in a Florida State League match, while Class A Boise meets Salem-Keizer in a Northwest League South divisional series. ... Monday's game was the first between the Marlins and Cubs since April, when Chicago took three of four at Marlins Park. ... A stiff northeasterly wind robbed Ruggiano of his 17th home run in the first inning, keeping his drive inside the park as the ball bounced off the left field wall for a double. ... Miami 3B Placido Polanco had a quiet afternoon, going 0-for-4 one day after a 3-for-4 effort in Atlanta for the 600th multi-hit game of his career. He's ranked 12th among active players in that category.