PHOENIX (CBSDFW.COM/AP) — Jarrod Dyson hit two home runs during a 2018 season shortened by a groin injury. The speedy outfielder already has two in 11 games this year, and his latest one was a game-winner.

Dyson connected for a pinch-hit, two-run shot with one out in the bottom of the ninth inning to give the Arizona Diamondbacks a 5-4 victory over the Texas Rangers on Tuesday night.

Batting for John Ryan Murphy with Eduardo Escobar on second base, Dyson ripped a 2-2 pitch from Rangers closer Jose Leclerc into the seats in right field. Arizona rallied from a 4-0 deficit after two innings for its third win in four games, with the 34-year-old Dyson hitting the first game-ending homer of his career.

“That is a tough guy there to try and put together a good at-bat with,” Dyson said of Leclerc. “I just tried to pick a good pitch over the middle of the plate and try to do a little damage with it, and I ended up getting a pitch I can handle and I got lucky.”

Matt Andriese (2-0) pitched two innings of scoreless ball in relief of starter Zack Greinke. Murphy and Nick Ahmed hit solo home runs for Arizona.

With the Diamondbacks down 4-2 in the ninth, Christian Walker led off with a single against Leclerc (1-1), who blew a save chance for the first time this season. Escobar doubled in Walker and Ahmed struck out before Dyson went deep.

“I think my fastball was good, my changeup was there,” said Leclerc, who entered with a scoreless streak of 25 2/3 innings. “Everything was good. They just hit whatever I threw and that was it.”

Diamondbacks manager Torey Lovullo said his team never quit.

“Exciting and well-deserved, because I felt like these guys were fighting the whole entire day,” Lovullo said. “We couldn’t really get anything going but we never shut down. You score three runs off a closer like Leclerc, you should feel pretty good.”

The loss ruined a strong effort from Texas starter Mike Minor, who struck out five in seven innings of five-hit ball. Elvis Andrus had two hits and drove in two runs to lead the Rangers, who have lost four straight.

“He used all his pitches effectively and worked both sides of the plate,” Texas manager Chris Woodward said of Minor. “When he’s got his changeup going like that it makes it a lot easier for the rest of his pitches to work.”

Texas scored twice in both the first and second innings, with Andrus’ double and Nomar Mazara’s groundout making it 2-0 and run-scoring singles from Rougned Odor and Andrus building a 4-0 lead in the second.

“I made some better pitches after that, but they were maybe a little up in the zone the first inning and maybe the first inning and a half,” Greinke said.

The right-hander settled down and retired 14 Rangers in a row from the second through the seventh before Shin-Shoo Choo’s second double of the game with one out in the seventh. Greinke allowed three earned runs and seven hits in 6 2/3 innings.

The Diamondbacks made it 4-1 in the third with Murphy’s home run, a solo shot yanked down the left field line. Ahmed went deep to left-center in the seventh off Minor.

Greinke’s strikeout of Choo in the fourth was the 2,453rd of his career, tying him with Sam McDowell for 41st on the career list. Greinke later surpassed that total.

The Rangers are now 5-6 on the season and are 5th in the AL West.

(© Copyright 2019 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)