Nationals reliever Sean Burnett reacts after giving ip back-to-back home runs to tie the game. (John McDonnell/THE WASHINGTON POST)

For the Washington Nationals, both games of Saturday’s doubleheader against the Pittsburgh Pirates unfolded like usual: Fall behind at some point, chip away — but only a little — at the opponent’s lead, tease them some more and then, just maybe, stage one of those late-inning comebacks that have seemingly become the norm this season. Both games had all the makings of a vintage 2011 Nationals game.

And though the setups were the same as many of the Nationals’ previous scripts, the story of one potential comeback fizzled out, while the other comeback came just in time thanks to a veteran hitter helping overcome an inept offense. The Nationals’ bullpen and offense collapsed in Saturday’s first game, a 5-3 loss to the Pirates, but in the second game they managed “just enough,” as starter John Lannan put it, for a come-from-behind 4-3 win.

“We managed to come out and win two out of three games, that’s pretty good when we really haven’t done the things we are capable of doing,” Manager Davey Johnson said. “That is a tribute of a good team. Once you start, everything comes together and the parts of the engine come together, it starts running nice and smooth, and then it becomes a lot more fun.”

Both games started much the same way, with the Nationals falling behind in a hurry. Starter Livan Hernandez set the stage early on in the first game, struggling with his off-speed pitches and allowing the Pirates to jump out to a two-run lead on two singles and a double. But after that initial first-inning slip-up, Hernandez settled in and pitched more comfortably through his seven-inning start. He struck out four batters over the next two innings; six in all for the game.

And true to their comeback form, the Nationals’ offense then began chipping away in the second inning. After a swinging strikeout by Laynce Nix to start the second inning, the Nationals strung together three straight singles by Michael Morse, Danny Espinosa and Ivan Rodriguez. It was Rodriguez’s hit to right field that scored Morse from second base, cutting the Nationals’ deficit to 2-1.

But for all the efforts to create opportunities, including in that second inning, the Nationals struggled to capitalize on them. Washington stranded nine runners, helping spoil what turned into a strong start by Hernandez. It was the third straight time a Nationals starter had pitched at least seven innings and allowed two runs or less — and failed to earn a win.

“We did the job,” Hernandez said, adding: “We kept the ballgame close. I think the young guys, everybody, we talk and talk about what we’ve got to do because we got a great team.”

With one out in the second inning, two runners on base and Ian Desmond batting, Espinosa was picked off at second base on a snap throw by catcher Michael McKenry. Pirates right-handed starter James McDonald then threw three straight strikes, the last two curveballs that Desmond watched go by to end the inning.

The Nationals would repeat their unspectacular efforts again in the fourth and fifth innings. Rodriguez stranded two base runners in the fourth inning when he struck out on three fastballs by McDonald. An inning later, McDonald struck out Nix on six pitches with the bases loaded, after singles by Desmond and Jayson Werth, and a Roger Bernadina walk.

A burst of power, and the game-tying run, came from an unlikely source. Rick Ankiel, who was activated from the disabled list this week after nursing a strained intercostal (rib cage) muscle, was inserted late in the game, as a pinch hitter for Hernandez in the bottom of the seventh inning. Ankiel smacked a low, hanging curveball into the first row of seats in right-center field for a home run. It was Ankiel’s second homer of the season — his first since the second game of the season — and a much-needed boost of confidence for a player who was struggling with consistency and health.

But then, in the eighth inning, reliever Sean Burnett, who had been re-gaining his shaky confidence in recent weeks, gave up back-to-back home runs to Garrett Jones and Andrew McCutchen, and quickly a 2-2 game turned into a 4-2 game. After the Pirates added another run in the top of ninth, the Nationals gave signs of a potential comeback in the bottom of the inning when Bernadina scored on a Werth RBI single with two outs. But true to the first game’s form, Ryan Zimmerman, the tying run, grounded out into a game-ending out. No late-game dramatics this time.

The second game took the alternate path despite another offensive performance that Johnson dubbed “terrible.” After falling behind, 2-1, in the third inning, Lannan settled into the game and pitched an effective seven innings — enough to allow the Nationals to tie the game twice before finally, and dramatically, taking the lead in the bottom of the eighth inning.

With two outs in the eighth, Rodriguez delivered the team’s second pinch-hit game-winning hit in two nights. Ankiel, who started the second game, scored from second base on Rodriguez’s RBI single to right, just as Pirate catcher Eric Fryer lost the control of the low throw from right field.

The Nationals had put pressure on the Pirates to score the tying run earlier that inning when Johnson called for a double steal. A bad, low throw to third baseman Brandon Wood to catch a stealing pinch-runner Brian Bixler slipped past him, allowing Bixler to tie the score at 3. It also put Ankiel in position at second base to score three batters later.

“I know it’s going to get better,” Johnson said. “I’m optimistic. I like to score runs.”