ATLANTA -- Through the first two innings Sunday, Jeff Samardzija appeared to be on pace to strike out 27 batters. The problem is, he didn't finish the game the way he wanted.

Samardzija struck out a career-high 13 batters, but not Ramiro Pena. The Atlanta infielder, one of two starters who didn't whiff, hit a tie-breaking two-run single in the sixth and Dan Uggla added a solo home run in the eighth to lift the Braves to a 5-1 victory over the Cubs.

Samardzija, coming off a stellar season opener in which he gave up two hits over eight scoreless innings, looked as if he was going to challenge the team strikeout records. He is the first Cubs pitcher to strike out as many as 13 batters in fewer than six innings.

"It's a double-edged sword when you strike guys out like that," Samardzija said. "Your pitch count gets up, you're showing them a lot of pitches. It's not a bad thing. I felt good, the pitches all felt good and a couple bad decisions there came back to haunt me."

The Cubs gave him a 1-0 lead in the first when David DeJesus doubled to lead off and scored one out later on Anthony Rizzo's groundout.

B.J. Upton led off Atlanta's first by reaching on an infield single that handcuffed second baseman Alberto Gonzalez. Samardzija then struck out six in a row before pesky Pena grounded out to start the third. Samardzija was two K's shy of the Cubs record for consecutive strikeouts of eight, done by three pitchers, most recently Juan Cruz in 2003.

Braves starter Tim Hudson followed Pena, and Samardzija got him looking at strike three, then walked B.J. Upton and fanned Jason Heyward on a slider to end the inning. Samardzija struck out two more in the fourth to reach 10, and Juan Francisco swung and missed a slider for No. 11 to start the fifth.

The Braves tied the game in the fifth. With two outs, Pena doubled and Hudson walked. That free pass turned the lineup over, which wasn't what the Cubs wanted to do. Both moved up on a wild pitch, and Samardzija then walked B.J. Upton. Ball four skipped past catcher Dioner Navarro and Pena scored on the wild pitch. Heyward swung and missed at a splitter to end the inning for Samardzija's 12th strikeout.

"It was an impressive outing and he obviously had his velocity and his split," Cubs manager Dale Sveum said of Samardzija. "It was one pitch that got away [on the wild pitch] that changed the whole game around."

Justin Upton was called out on strikes to begin the sixth for No. 13. With two on and two outs, Chris Johnson tried to dodge an inside pitch, which he said hit him. Samardzija argued that Johnson had swung, but home plate umpire Alfonso Marquez agreed with Johnson that he was hit, and the bases were loaded.

"We were trying to go up and in after I threw a slider and I guess it grazed him," Samardzija said.

Pena then delivered his go-ahead single.

"Pena beat us two days in a row," Sveum said. "He's one guy in that lineup who you didn't expect to beat us two days in a row. He caught us with our guard down."

Samardzija was lifted after 105 pitches, and Hudson helped himself with an RBI single off Michael Bowden.

Samardzija's previous strikeout high was 11, which he had done twice before, including July 2 at Turner Field. That start sparked a strong finish to the 2012 season as he posted a 2.58 ERA in his final 13 games. Samardzija also fanned 11 on Aug. 13 against the Astros.

Strikeouts are fun, but they don't always help you win games.

"You've got to finish," Samardzija said. "I was happy with how I was through five, and you just have to finish the ballgame out especially with a lineup like that. You take a deep breath. That team is going to win 95 games this year. You need to lock it down the whole time you're on the mound, you need to make sure you're making your pitches to the one-hole hitter, the eight-hole hitter."

Samardzija has seen Kerry Wood's record 20-strikeout game from May 1998.

"I've seen it about 100 times in the clubhouse," Samardzija said. "I know what's going on."

He's got different goals.

"You strike out a lot of guys, the pitch count gets up, and as a starter, your job is to pitch deep in the game and keep it close and I failed to do that," Samardzija said. "Strikeouts or no strikeouts, it doesn't really matter. All that matters is the outcome, and the outcome wasn't in our favor so I didn't do my job."

With the loss, the Cubs finished the road trip 2-4, and now head to Chicago for their home opener against the Brewers. It will be the 100th season of baseball at Wrigley Field, and Hall of Famer Ernie Banks will lead the crowd in the seventh inning stretch.

"I'm excited about it," said Edwin Jackson, who will make his second start. "We get to officially start the season in front of our home crowd, I'm sure they're excited as well. It should be a good time. Hopefully the weather permits us to play."

Chicago's forecast calls for a 60 percent chance of rain. The Cubs' offense, batting a feeble .175, could use some warm weather, sunshine and the wind blowing out.

"Your starters can't be that good [as they have been]," Sveum said. "They've been really, really good up to this point. It's hard to win when you're scoring one, two, three runs consistently."