With two on and one out in the top of the eighth inning and Greinke having hit the wall after 114 pitches, former Atlanta left-handed reliever Luis Avilan came on for the Dodgers to face left-handed-hitting Brandon Belt and protect a one-run lead, with Buster Posey on deck.
Belt sent the first pitch foul down the right-field line, missing a home run by about 20 feet. He battled through the count to 2-2 when a 94 mph sinker broke his bat and produced a soft liner heading past second base.
Rookie second baseman Jose Peraza -- who came over with Avilan, Jim Johnson and Alex Wood in the Hector Olivera-Paco Rodriguez trade -- ranged to his right, backhanded the ball on one bounce and, in one motion, flipped with his glove to shortstop Jimmy Rollins, who relayed to first for an inning-ending double play.
"I was just trying to get one out," said Avilan. "I'm a sinkerball guy and the percentages are that I'll get a ground ball; that's what I'm trying to do. But I've been unlucky this year. A lot of lefties have gotten broken bats and bloopers. I know Peraza is fast and he's got a good glove. I was fortunate to have him playing second base. Give him a lot of credit, that was a tough play."
Peraza, playing in only his fifth Major League game, had another busy night. He dropped a Kelby Tomlinson popup in the second inning, requiring Greinke to escape a jam with runners on the corners by getting Bumgarner on a popup that Peraza caught.
"Jose has been fearless. He comes to play, doesn't get too excited, keeping everything in perspective," said manager Don Mattingly.
Peraza said he's turned the glove flip several times at Triple-A and was confident he could get to the ball as it came off the bat. It was only the third double play Belt has grounded into this year.
Mattingly said he would have brought in Juan Nicasio to face Posey, but was understandably pleased that wasn't necessary. Instead, Kenley Jansen pitched a perfect ninth inning for his 28th save and the Dodgers bullpen came up clutch again, one night after pitching nine of Monday night's 14 innings.
With the win, the Dodgers matched their season-high 5 1/2-game division lead and have won the three-game series with Clayton Kershaw pitching Wednesday night's finale. That said, the champagne has not been put on ice.
"Not when you're playing against the Giants," said catcher A.J. Ellis. "Those guys are so resilient and so tough. This doesn't matter. It doesn't even matter what happens tomorrow. There are so many more games to play."
Ken Gurnick is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.