Vargas earned his fourth victory in five decisions, and Arizona scored on a wild pitch and two errors to salvage the third game of their series against the Milwaukee Brewers with a 3-0 victory Wednesday.
Vargas, Jose Valverde and Brian Bruney combined for the shutout.
"Claudio was huge for us on a day we didn't swing the bat very well," Arizona manager Bob Melvin said.
Vargas (4-5) allowed six hits in six innings, struck out six and walked one to beat former Washington teammate Tomo Ohka (6-6). Claimed off waivers from Washington on June 3, Vargas has made seven starts since taking over the rotation spot of Russ Ortiz, who has a broken rib.
"I feel good," Vargas said. "I got my confidence back. I'm focused. I've been pitching like I know I can."
Bruney pitched a perfect ninth for his 12th save in 15 chances.
Ohka gave up a run in the third on a wild pitch, and first baseman Lyle Overbay's throwing error made it 2-0 in the seventh. An errant pickoff attempt by reliever Julio Santana allowed Troy Glaus to score in the eighth.
"Defensively, we gave them the three runs that they got," Milwaukee manager Ned Yost said. "We just didn't play very solid defensively. That was the difference in the game."
Ohka, acquired on June 10 for infielder Junior Spivey, gave up two runs -- one earned -- four hits and three walks in seven innings.
"Ohka was great," catcher Chad Moeller said. "You can't ask a starter to do more than what he did. He threw ground balls, got quick outs."
Milwaukee (50-52), which hasn't finished with a winning record since 1992, was trying to reach .500 for the first time since May 28.
"If we get it two days from now, we're not stopping the season, jumping up and down and everybody going home," Milwaukee manager Ned Yost said. "We've got 59 more games to play."
The Brewers outhit the Diamondbacks 8-5. Each of the Brewers were singles.
After the game, Arizona designated outfielder Jose Cruz Jr. for assignment. Cruz, who struck out as a pinch-hitter in the ninth, was batting .213. The Diamondbacks purchased the contract of first baseman Conor Jackson from Triple-A Tucson.
"We have to try something to mix it up and get more offense," Melvin said.
Arizona, which lost the first two games of the series, went ahead in the third when Quinton McCracken tripled to left-center leading off and scored with two outs on Ohka's wild pitch.
Chad Tracy reached in the seventh on a single through the right side of the infield and scored when Overbay threw wildly past the pitcher, who was covering first, on pinch-hitter Alex Cintron's grounder to first.
Glaus reached in the eighth when second baseman Rickie Weeks made a fielding error, took third on Tracy's single and scored when Santana made the bad pickoff with McCracken at the plate.
"There were some breaks," Melvin said. "We don't catch many of them, but we got three of them today."
Glaus returned to the starting lineup after he missed two games because of back spasms. ... Milwaukee purchased the contract of RHP Rick Helling from Triple-A Nashville and designated RHP Ricky Bottalico for assignment.