Diamondbacks starting pitcher Wade Miley pitched well enough to win Friday against the Brewers, but it took a late rally by the offense to get him the victory.

Miley allowed just one run in six innings of work, but exited the game with a 1-1 tie. The offense got going as soon as Miley was out of the game, as the Diamondbacks put up two runs in the seventh inning to put Miley in line for the win.

He allowed just a solo home run while scattering five hits and a walk in his six innings of work. Miley struck out eight, throwing 62 of his 89 pitches for strikes in a 3-1 victory.

Miley will make his second start of the season Wednesday against the Pirates, a team he faced once in 2012. Miley threw six strong innings in a losing effort against them a year ago.