Updated

Mitch Moreland hit a two-run homer, rookie right-hander Justin Grimm took a shutout into the sixth inning and Texas snapped its first three-game losing streak of the season with a 9-5 interleague victory against the Arizona Diamondbacks on Thursday.

Grimm (5-3) allowed four hits through five innings and was replaced after giving up three runs in the sixth.

The 24-year-old AL rookie leader in wins and strikeouts gave up eight hits and three runs, two earned, with three strikeouts.

The Rangers beat the Diamondbacks after they were swept in a doubleheader in Arizona on Monday and had the first of two games in Texas rained out Wednesday night.

Arizona right-hander Brandon McCarthy (2-4) had allowed one run in 25 innings when the Rangers scored six in a span of four outs in the second and third.

The outburst started when center fielder A.J. Pollock misplayed a line drive by Nelson Cruz into a double. A.J. Pierzynski brought Cruz home with a double and scored on a two-out single from Leonys Martin.

The Rangers went up 6-0 in the third on three straight run-scoring hits — a double from Adrian Beltre, a single by Cruz and a two-run homer from Moreland that hit near the top of the foul pole in right.

McCarthy lost for the first time since April 26 in his shortest outing of the season. He gave up nine hits and six runs in just 2 2-3 innings.

Moreland was hit by a pitch on the shoulder by reliever Josh Collmenter the next time he came up after his 11th home run and scored on a two-run single from Elvis Andrus that made it 9-0.

Grimm lost his shutout when he gave up four straight hits in Arizona's three-run sixth, starting with a double from Paul Goldschmidt, who tied a career high with four hits. An error by Martin in center on a single by Miguel Montero led to an unearned run.

The Diamondbacks got within 9-5 in the sixth on RBI singles from Goldschmidt and Martin Prado off Texas reliever Michael Kirkman. Neal Cotts replaced Kirkman with two outs and struck out Montero with the tying run on deck.

Texas prospect Jurickson Profar had a career-high three hits a day after learning that his stay with the Rangers would be at least two weeks longer because second baseman Ian Kinsler's rib injury has been slow to heal.

Moreland and David Murphy, who hit his fifth homer, were among four Rangers with two hits.

Notes: Arizona 3B Eric Chavez left the game in the first inning after straining his right oblique on a swing. After fouling off a second consecutive pitch from Grimm, he grabbed his right side and walked to the dugout. He was replaced by Cliff Pennington. ... The Texas grounds crew stayed until 2 a.m. after a high winds from a thunderstorm prevented the crew from getting the tarp down before heavy rainfall. Both baselines were swamped and had to be rebuilt.