PHOENIX, Sept. 21 (UPI) -- Pedro Alvarez and Derrek Lee homered Tuesday to give the Pittsburgh Pirates a 5-3 win over Arizona.
Neil Walker and Alex Presley had two doubles each for the Pirates, who snapped a four-game losing streak.
Charlie Morton (10-10) allowed three hits in six scoreless innings to get the win. Joel Hanrahan set the Diamondbacks down in order in the ninth for his 39th save.
Despite the loss, Arizona's magic number in the National League West ticked down to three games thanks to the Los Angeles Dodgers' 2-1 victory over second-place San Francisco.
Daniel Hudson (16-11) was handed the loss after allowing three runs on seven hits over five innings.
Ryan Roberts and Willie Bloomquist each drove in a run for Arizona. The Diamondbacks were blanked until the seventh inning when Bloomquist singled Gerardo Parra in from second.