SAN FRANCISCO — Aaron Blair has a pretty good sense of what he needs to do to be successful in the majors.

“I’m a pitcher that needs to be down in the zone and create movement,” he said. “When I’m up it’s just flat, it goes a long way.”

The 24-year-old pitcher had trouble keeping the ball down in his most recent outing, and it didn’t work out well for him or the Braves.

Joe Panik homered twice and matched his career high of four RBIs to back Madison Bumgarner, and the San Francisco Giants beat Atlanta 13-4 on Sunday to win a series for only the second time since the All-Star break.

Blair, called up from the minors to make his first big league start in more than two months, allowed five runs over four innings. He gave up three homers.

The Giants scored eight runs off the Braves’ bullpen in the seventh inning, when they tripled three times and sent 14 batters to the plate.

Blair (0-6) was brought up Sunday from Triple-A Gwinnett and is expected to stay in the rotation, manager Brian Snitker said, noting the organization is committed to the young pitcher’s development.

Blair has allowed 11 home runs in 12 starts this season, six of which have been to Giants hitters. Panik has homered three times off Blair.

“You’ve got to stay with him, keep working with him,” Snitker said. “You saw glimpses of the stuff, but it’s got to be consistent.”

Blair said he’s not taking the opportunity to pitch in the majors lightly.

“I had my name on the map early,” he said. “I kind of faltered middle months; I’m trying to get my name back on the map again.”

Freddie Freeman and Gordon Beckham homered for Atlanta. Ender Inciarte doubled, tripled and scored twice, but the last-place Braves have lost 13 of 18.

Denard Span and Eduardo Nunez also homered, Brandon Crawford had three hits and Jarrett Parker drove in three runs for San Francisco.

The Giants took two of three from the Braves and remained two games behind the first-place Los Angeles Dodgers in the NL West.

Bumgarner (13-8) allowed three runs over seven uneven innings. He struck out five and walked two.

San Francisco’s four-time All-Star pitched in and out of trouble most of the day but punctuated his afternoon with an emphatic fist pump after striking out pinch-hitter Jace Peterson to end the seventh.

Panik hit a solo homer in the second and added a two-run shot in the fourth. The second baseman also reached on an infield single in the sixth and had a sacrifice fly in the seventh.

It was the first multihomer game of his career.

The Giants broke open a 5-3 game in the seventh.

“Being in the game that long with Bumgarner, we played good baseball for six innings, it just kind of unfolded there in the seventh,” Freeman said.

The slugger was asked if there was anything his young teammates could take from the game.

“Just forget about this one and just move on,” he said. “Take the day and a half that we’re going to get for today and tomorrow and come back Tuesday ready to play the Padres.”

HOT HITTER

Inciarte extended his hitting streak to 10 games. He’s batting .436 (17 for 39) with 10 runs during that stretch.

EXTRA, EXTRA

Freeman hit his 27th home run off Bumgarner in the sixth for his 67th extra-base hit of the season. Freeman had the second-most extra-base hits in the league going into Sunday.

TRAINER’S ROOM

Braves: RHP John Gant was optioned to Triple-A Gwinnett to make room for Blair. … Freeman was in the lineup for a third straight day with a sore back after tumbling over the railing and crashing into a seat Thursday in Arizona. “I feel good now,” he said. “The soreness has gone down greatly over the last couple of days.”

UP NEXT

Braves: RHP Julio Teheran (3-9) pitches against San Diego on Tuesday in the opener of a brief, three-game homestand. Teheran is winless since June 19.