Updated

MIAMI (AP) -- Rookie Luis Castillo pitched a career-best eight innings, Tucker Barnhart drove in three runs and the Cincinnati Reds ended a six-game skid, beating the Miami Marlins 6-4 on Sunday.

Castillo (2-4) allowed one run on three hits, striking out six and walking one. He outpitched Dan Straily (7-7) -- the right-handers were traded for each last January as part of a four-player deal.

The Marlins, who got a three-run homer from Marcell Ozuna in the ninth off reliever Raisel Iglesias, had their four-game winning streak snapped. NL home run leader Giancarlo Stanton was held out of Miami's lineup for the first time since May 31.

Castillo and Miami starter Dan Straily (7-7) were involved in a trade for one another in January.

Castillo, who was the Marlins' minor league pitcher of the year last season, primarily used his upper-90s fastball to keep the Marlins off-balance. He allowed one run and three hits while striking out six and walking one as 70 of his 106 pitches went for strikes.

Castillo also went 1 for 3 with an RBI and laid down a sacrifice bunt.

Iglesias relieved Castillo to start the ninth and allowed a three-run homer to Ozuna's 24th homer to make it 6-4. Iglesias retired the next two batters to end the game with Stanton in the on-deck circle.

Straily, who went 14-8 in his only season with the Reds last year, allowed two runs and seven hits in six innings. He struck out four and walked two.

Miami's A.J. Ellis hit a double over the head of diving center fielder Billy Hamilton to cut the deficit to 2-1 in the sixth.

The Marlins had an opportunity to tie the game with Christian Yelich at bat, but Yelich tipped a ball just in front of home plate and was immediately tagged out by catcher Barnhart, who threw down to third to get Ellis trying to advance to end the inning.

The Reds responded by breaking open the game with four runs in the seventh, pushing their lead to 6-1. Adam Duvall grounder into a fielder's choice for a run, Jose Peraza drew a bases-loaded walk, and Barnhart delivered a two-run single up the middle.

The Reds opened the scoring in the second with a pair of runs keyed by four consecutive singles including run-scoring ones by Barnhart and Castillo.

The Marlins escaped a dangerous situation later in the second when the Reds loaded the bases for Joey Votto, who hit a foul pop-up that was dropped by shortstop Miguel Rojas with third baseman Derek Dietrich converging. However, Votto was unable to take advantage of the miscues, grounding out to end the inning.

TRAINER'S ROOM

Reds: RHP Anthony DeSclafani (right elbow) has not pitched in the majors this season, but made his second rehab start on Saturday with four scoreless innings for Single-A Dayton, allowing one hit and no walks.

UP NEXT

Reds: RHP Homer Bailey (2-5, 8.37 ERA) is scheduled to start Tuesday's game at Pittsburgh after a day off. Bailey is 8-6 with a 3.58 ERA in 19 career starts against the Pirates.

Marlins: RHP Jose Urena (9-4, 4.04) will take the mound on Monday to open a three-game series against the Washington Nationals, who will counter with LHP Gio Gonzalez (8-5, 2.81). Urena allowed five runs in five innings in his last start at Texas.