MIAMI -

Nick Martinez allowed two runs over six innings in his homecoming, Alex Rios drove in two runs and the Texas Rangers roughed up Miami starter Nathan Eovaldi early on the way to a 5-4 win over the Marlins on Wednesday afternoon.

Leonys Martin had three hits for Texas, which grabbed a 5-0 lead after two innings.

Martinez (3-9) allowed six hits and threw 62 of his 96 pitches for strikes. He was born in nearby Hialeah and pitched at Belen Jesuit Prep, about 12 miles from Marlins Park.

Miami rallied in the ninth with solo homers by Marcell Ozuna and pinch-hitter Jarrod Saltalamacchia, both off Neftali Feliz. And with the tying run on first, Feliz closed out his fifth save in six chances by striking out Donovan Solano to end the game.

Eovaldi (6-8) gave up nine hits and five runs, four earned, in five innings.

Martinez had a 3-0 lead before taking the mound in his home city for the first time, after Texas -- which had been held to three runs or less in 14 of its last 18 games entering Wednesday -- strung together four straight two-out hits in the opening inning. J.P. Arencibia's double brought Rios home with the first run, and Adrian Beltre also came around when Marlins shortstop Adeiny Hechavarria dropped the relay throw.

Martin's single made it 3-0, and Rios' second-inning double -- on a popup that dropped in right -- pushed the lead to 5-0.

That was enough for Martinez, who gave up an RBI double to Ozuna in the fourth, then let Ozuna score Miami's second run on a wild pitch. Otherwise, he largely escaped trouble and helped Texas salvage a split of the two-game set.

Ozuna and Christian Yelich each had three hits for Miami.