And then, everything crumbled.
"We should have won this game," Duke said. "The responsibility falls on my shoulder for the fact that we didn't win it."
Down, 4-0, the Giants chipped one run away in the fifth before balls started leaving the park with regularity. First it was catcher Eli Whiteside, whose fifth-inning solo shot came on the 12th pitch of the at-bat.
Even still, Duke hardly seemed out of control.
The sixth was set up to be his final inning of work, with two relievers warming up as the inning progressed. Duke gave up a one-out single to Sanchez, but with the left-hander one pitch away from getting out of the inning unscathed, no one anticipated how quickly things would turn.
And then ...
"He just got flat all of a sudden," manager John Russell said. "He got two outs and had some free swingers at the plate. If he makes his pitches, he should be fine. He just left some balls over the plate."
The first came to Juan Uribe, who deposited a hanging sinker into the grassy center-field knoll to tie the game. After allowing a single that hardly made it past the infield dirt, Duke tried to sneak a 1-0 fastball by outfielder Aubrey Huff. He couldn't, and Huff promptly sent it out of the ballpark. After being one pitch away from a quality start, Duke found his team down two minutes later.
"If someone would have told me Zach was going to give up two, two-run homers in that inning, I would have been very, very surprised," Russell said. "He's one of the guys we can count on in that situation. Unfortunately, he didn't get it done tonight. I thought he threw the ball well up until that inning."
It marked the second time this year that Duke had served up three long balls in one game.
As was the case on Friday, Duke's season has been simultaneously highlighted by dominance and marred by command issues from one outing -- and often one inning -- to the next. He's allowed two or fewer earned runs in half of his six starts, evidence that when the left-hander is in sync -- often meaning that his sinker is particularly effective -- he can compete with the best.
It was less than three weeks ago, you'll remember, that Duke outdueled Phillies ace Roy Halladay.
But when he's been off, Duke has been knocked around hard. Four times now, he's allowed six or more runs in a start, including each of his past two.
"That's something I'm focused on getting back for sure," said Duke, who had not previously lost a game this season when provided four or more runs of support. "I'm frustrated with how the night ended up."
Duke's inability to make the offense's early lead stand also has Pittsburgh starters still winless since May 18.
All four of the Bucs' runs came off Giants starter Jonathan Sanchez, but were aided by rookie Buster Posey's two-out error. Posey, a rookie much less experienced at first base than he is behind the plate, was unable to corral Duke's bouncer near the bag in the second inning. That allowed one run to score, as well as extended the inning long enough for Andrew McCutchen and Neil Walker to drive in three more.
Though all four runs were unearned, the inning output surpassed the Pirates' final run total from each game since May 24, when the team scored five times in a loss to Cincinnati.
The success against Sanchez would be short-lived, though, as the Giants lefty proceeded to retire 13 straight until Andy LaRoche led off the seventh with a single. Sanchez then issued a one-out walk in the inning, ending his night and giving the Pirates their only other promising run-scoring opportunity.
McCutchen couldn't push either runner across, instead moving them up a mere 90 feet on a groundout. Then, after getting ahead, 2-0, against Giants reliever Santiago Casilla, Walker swung through three pitches, all of which were well outside the zone. The latter two were 98-mph fastballs.
"Ultimately, it wasn't a very good at-bat," Walker said. "I went out of the zone. The guy had good stuff, so I should have made him throw the ball over the plate. I tried to do too much, that's all."
The Pirates went quietly in the final two innings, as the team had its modest two-game winning streak snapped. The club also watched Freddy Sanchez finish the night 3-for-4 in his first game back at PNC Park since Pittsburgh traded the second baseman away last July.