PHOENIX -- Ricky Nolasco has been nearly untouchable lately, and he's not talking about it.
Nolasco allowed three hits and struck out 10 over 7 1/3 innings, and Josh Willingham went 3-for-4 with a homer and two RBI to help the Marlins take two of three from the NL West leaders. Florida moved within five games of the first-place New York Mets in the NL East.
"That's what we shoot for -- two out of three and move on to the next one," Marlins manager Fredi Gonzalez said.
Nolasco also hit an RBI double for Florida, which won seven of nine against the Diamondbacks this season.
"Good riddance to them," Arizona manager Bob Melvin said jokingly. "They've been tough on us all year."
Nolasco (13-7) did not walk a batter five days after throwing a two-hit shutout in San Francisco. The right-hander walked one and struck out 11 against the Giants. Over his past four starts, he has struck out 43 and walked only three.
"He goes out and you know you're going to get a quality start," Willingham said.
Kevin Gregg pitched the ninth and allowed a pair of base runners before nailing down his 29th save in 36 chances.
Stephen Drew hit his second career leadoff homer and scored both runs for Arizona, which finished 4-2 on its weeklong homestand.
"To go 4-2 and get three games ahead (of second-place Los Angeles) is a good thing," Drew said.
Nolasco also gave up a one-out double to Conor Jackson and a two-out walk to Tony Clark in the first but then retired his next 13 batters.
Nolasco struck out the side in the fourth and seventh. He is 3-0 against the Diamondbacks this season and 4-0 in his career against Arizona.
Arizona's 4-5-6 hitters -- Adam Dunn, Clark and Mark Reynolds -- went a combined 0-for-8 with seven strikeouts against Nolasco.
"He's been the most consistent pitcher we have," Gonzalez said.
Nolasco helped his own cause in the second when he broke a 1-all tie with a double to right, scoring Luis Gonzalez, who hit a one-out double off starter Doug Davis.
Willingham made it 3-1 when he led off the sixth inning with his ninth home run.
Drew pulled Arizona to 3-2 in the bottom half when he doubled, went to third on a groundout and scored on a grounder by Jackson.
Florida added a pair of insurance runs in the ninth on doubles by Jeremy Hermida, Paul Lo Duca and Hanley Ramirez.
Davis (5-8) allowed three runs and seven hits with eight strikeouts in seven innings. The left-hander lost for the third time in four decisions despite not walking a batter for the first time this year.
"I pretty much got outpitched," Davis said.
Willingham gave Florida a 1-0 lead when he drove in Alfredo Amezaga with a two-out single.
Drew tied the score when he hit his 15th home run into the swimming pool behind the right-center fence.
"I gave one up early, but the early runs put a little less stress on you," Nolasco said. "We came out swinging today and I started putting pressure on them."