MILWAUKEE (AP) Rookie left-hander Justin Nicolino pitched 6 2-3 solid innings and Derek Dietrich homered as the Miami Marlins beat the Milwaukee Brewers 6-2 on Monday night.

Nicolino (2-1) scattered six hits and allowed just two runs in his fourth major league start. He retired the first two batters of the seventh inning before allowing a two-out double and was replaced after throwing 95 pitches.

Milwaukee starter Matt Garza (6-13) pitched two perfect innings to start the game but ran into trouble the rest of the way, lasting only five innings. He allowed five runs on eight hits while striking out two. He set a career record for losses in a season - he was 8-12 with Tampa Bay in 2009.

More from FoxSports

Dee Gordon had two hits, two RBIs, scored a run and stole a base for Miami, which has won five of seven games.

Ryan Braun had two singles and a walk for Milwaukee, which had its three-game winning streak snapped.

After using only 19 pitches to get through the first two innings, Garza allowed consecutive singles to J.T. Realmuto and Adeiny Hechavarria to open the third. One batter later, Gordon singled and both runners scored to give Miami the lead for good, 2-1.

Dietrich hit his seventh home run, a two-run shot to center field, to make it 4-1 in the fourth inning.

Martin Prado's sacrifice fly made it 5-1 in the fifth.

Milwaukee scored one earned run on an error by Hechavarria in the second and another on an RBI single by Braun in the fifth to close the gap to 5-2.

The Brewers had two runners on and Braun at the plate as the tying run with two outs in the seventh, but Bryan Morris got the Milwaukee slugger to ground out to end the inning.

Marlins pinch-hitter Casey McGehee then hit an RBI single in the eighth.

The game ended on a close groundout by Jonathan Lucroy at first that was challenged by Brewers manager Craig Counsell. After a short review, the call was confirmed and the teams left the field.

TRAINER'S ROOM

Marlins: RHP David Phelps was placed on the 15-day DL with a strained right elbow. Phelps left Sunday's game at St. Louis after just 2 1-3 innings due to the injury. RHP Erik Cordier had his contract selected from Triple-A New Orleans to take Phelps' spot on the roster.

UP NEXT

Marlins: Miami will start left-hander Adam Conley in Game 2 of the series. Milwaukee has fared better against southpaws, going 13-13 against lefties compared to 38-56 against right-handed starters.

Brewers: Rookie Tyler Cravy will make his sixth appearance and fifth start. He allowed four runs in just 4 1-3 innings in his last start, a 9-2 loss to the Chicago Cubs.