Jordan Zimmermann took a loss despite allowing one earned run in seven innings. (Nam Y. Huh/AP)

Sunday afternoon, the Washington Nationals copied the formula that gave them two victories to start this season, except for the important part. Their offense stalled. Their pitching, in this case seven stellar innings from Jordan Zimmermann, kept them in the game. They staggered the Chicago Cubs in the final innings. They just never completed the comeback.

In a 4-3 loss before 31,973 at Wrigley Field, the Nationals nearly shocked the Cubs again after Adam LaRoche drilled a two-out home run in the top of the ninth, an offensive spasm after another punchless beginning. The Nationals wasted Zimmermann’s dominance and mostly kept alive concerns about their ability to score runs. Still, even as right-hander Jeff Samardzija mowed them down, the Nationals had conditioned themselves to believe they would somehow win.

“All of us thought we had a chance,” LaRoche said. “Anything can happen in baseball. We were putting up a fight. Just too little, too late.”

While cleanup hitter Michael Morse continued rehab in the minors from a strained muscle in his back, the Nationals managed four hits and struck out eight times against Samardzija, a converted reliever who came within one out of a complete game in his sixth career start.

After Ian Desmond led off the game with a double, Samardzija retired 15 consecutive hitters. With the Cubs’ three starting pitchers on the mound in the season-opening series, the Nationals scored five runs in 221 / 3 innings. During the first seven innings in their opening series, the Nationals went 9 for 72 (.125) with four walks.

“I think it’s too early to worry about that,” LaRoche said. “I think that’s just more the way it’s been going.”

They could find plenty of culprits. Ryan Zimmerman, robbed of two homers by the wind in the opener, went 0 for 4, dropping to 1 for 11. Chad Tracy, the off-the-bench hero in two wins, struck out in his eighth-inning pinch-hit appearance. Jayson Werth went 0 for 3 with a strikeout and a ninth-inning walk Sunday, making him hitless in 10 at-bats with five strikeouts to start his second Nationals season.

Werth carried confidence in his swing out of spring training, and his disappointing results haven’t changed that. Werth drew three walks, including one Sunday with two outs in the ninth off Carlos Marmol that set up Xavier Nady’s game-ending pop-up. He narrowly missed his first hit Sunday when third baseman Ian Stewart made a diving stop and strong throw.

“I worked some walks in some tights spots against some pretty good pitchers,” Werth said. “I swung the bat good the first day. I couldn’t come up with anything. Just part of the game. I feel good.”

The offensive rut forced Zimmermann to face the same fate he did so many times last season, an outstanding start foiled by not enough run support. The Nationals scored 3.2 runs per game when Zimmermann started last year. Sunday, when he allowed two runs, only one earned, on six hits and no walks over seven innings, they managed a lonely one until the ninth.

When Alfonso Soriano hit a broken-bat single to score Darwin Barney in the sixth, giving the Cubs a 2-1 lead, Zimmermann could only take the loss. Zimmermann is 12-19 in his career, but seven of his past 12 losses have come when he allowed two earned runs or fewer.

“It doesn’t change my approach,” Zimmermann said. “I’m just going to keep throwing strikes and try to get as many outs as possible.”

When Zimmermann exited for a pinch hitter after only 80 pitches, the Nationals trailed 2-1. “If we could stay within one run,” Manager Davey Johnson said, “I felt we’d win the ballgame.”

But the Nationals’ bullpen, so dominant over 71 / 3 scoreless innings the first two games, could not hold the deficit. Ryan Mattheus and Sean Burnett combined to allow two runs in the eighth inning.

Saturday, Mattheus had thrown 10 pitches in a dominant, 1-2-3 inning. Sunday, he walked the first hitter he faced, David DeJesus, and gave up a one-out double to Starlin Castro, who scored after Burnett allowed a single.

“This is the time you want to go back-to-back,” Mattheus said. “This is when you feel the freshest. I felt great today. I felt like my stuff was just as good as it was the day before. I didn’t locate where I needed to.”

The Nationals scored their lone run before LaRoche’s homer thanks to another outstanding, two-strike at-bat by Danny Espinosa. With one out and Wilson Ramos on third in the sixth, he fell behind Samardzija, 0-2, by flailing at the first two pitches.

Espinosa struck out 166 times last season, once every 3.96 plate appearances, and all spring he focused on a new approach with two strikes. Saturday, Espinosa fouled off four consecutive two-strike pitches before he launched a crucial solo homer. Sunday, he had another chance.

Espinosa dribbled away a fastball, took a ball and flicked away another of Samardzija’s pitches. On the sixth pitch of the at-bat, Espinosa hooked a fly ball to right field, deep enough to score Ramos without a throw home. The Nationals had tied it up at 1.

They would not muster another base runner until the ninth, until it was too late, even for them. The Nationals’ clubhouse fell quiet afterward, the stereos off, the television screens blank. “It’s not the TV’s fault we lost,” Zimmerman said, letting out a small chuckle.

The players summoned the clubhouse manager to flip on the Masters. They watched golf, ate Italian food and prepared for their trip to New York, not at all worried about an offense that hadn’t showed up yet, one series down and 53 to go.