PITTSBURGH — Christian Yelich homered in the first inning, Miami added a pair of unearned runs and the Marlins rallied past the Pittsburgh Pirates 3-2 Sunday to complete a three-game sweep.

Jose Urena (2-4) allowed two runs and four hits in six innings as the Marlins swept a series for the sixth time this season. He lowered his ERA from 6.80 to 6.33.

Fernando Rodney completed the five-hitter, working around a two-out walk in the ninth. Rodney retired Francisco Cervelli on a game-ending groundout for his third save of the series and 24th in 26 chances this season.

Miami went 6-1 this year against the Pirates and moved ahead of Pittsburgh in the NL wild-card race. The Marlins (65-59) trail St. Louis (65-57) by one game for the NL’s second wild card.

Wearing 1970s throwback uniforms and caps, the Pirates (62-59) dropped 1 1/2 games back of Miami.