James McDonald made it to the sixth inning Tuesday against the Arizona Diamondbacks. That was a bit surprising, considering how things began for the Pirates right-hander.

McDonald was knocked around in the first inning, but hung tough and gave the Pirates time to rally for a 6-5 victory.

“The first inning wasn't very good,” manager Clint Hurdle said. “He made some adjustments and regrouped. We got just what we needed out of everybody.”

It helped that the Pirates cracked double digits in hits for the first time this season. They got 11 hits — which was as many as they collected over the entire three-game series last weekend against the Los Angeles Dodgers.

For the fourth game in a row, Starling Marte hit a leadoff single in the first inning. He stole second and went to third on Andrew McCutchen's fly out to right field. Marte scored on Garrett Jones' infield single.

Russell Martin hit a ground-rule double — his first hit of the season, snapping an 0-for-17 streak. If the ball hadn't hopped over the left field wall, Jones probably would have scored. But Jones had to stop at third, and Pedro Alvarez snuffed the threat by grounding out.

McDonald (1-1) issued four-pitch walks to two of the first three batters he faced. Miguel Montero doubled to center, giving the Diamondbacks a 2-1 lead. With two outs, Jason Kubel hit an opposite-field homer.

By the time the inning was done, McDonald had thrown 31 pitches. Only 15 of them were strikes. It was his roughest first inning since April 10, 2011, when McDonald was tagged for four runs by the Colorado Rockies.

Over the next four innings, though, McDonald blanked the Diamondbacks and gave up just one hit. With his breaking ball eratic and his fastball command spotty, McDonald relied on his changeup more than he has in a long time.

“I felt different two through five than I did in the first inning,” McDonald said. “In the first, I felt lackadaisical and not as much in rhythm or in sync. After the second, my body felt different. I had better momentum, and everything felt more relaxed and better.”