MIAMI -- Giancarlo Stanton kept connecting.

Leading a dugout celebration following the Miami Marlins' latest go-ahead hit, Stanton slapped Marcell Ozuna repeatedly atop the head. The pounding from baseball's most prodigious slugger had to hurt, right?

"It made me feel great," Ozuna said with a grin.

Lately, the Marlins are feeling no pain. Stanton homered twice Friday night, increasing his major-league-leading total to 49, and Ozuna's three-run homer capped a comeback as Miami climbed above .500 for the first time since April by beating San Diego 8-6.

Stanton had his ninth multihomer game this season, the most in the majors since Jose Bautista totaled nine with Toronto in 2010. Stanton's home run total is the highest in the National League since Prince Fielder hit 50 for Milwaukee in 2007 -- and the Marlins still have 35 games to play.

Stanton is on pace to finish with 63 homers.

"I'm not worried about homers," he said. "I just want to hit the ball hard and be in a position to strike when they give me a pitch, because it's going to get less and less, and I've got to be ready for that."

He had five RBIs to increase his season total to 105, both matching career-highs.

Led by their All-Star right fielder, the Marlins (64-63) have recovered from a 14-27 start to join the NL wild-card chase. They've won 11 of their past 14 games, and the latest victory thrilled a lively crowd of 22,489, which gave Stanton a standing ovation after his second homer and booed when he was walked in the seventh.

Two batters later, Ozuna homered off Kirby Yates (3-5) to increase his RBI total to a career-best 101.

Leading the jubilant reception for Ozuna was Stanton, who said he didn't hold back when pounding on his teammate.

"Nah, you give Ozuna everything," Stanton said. "I was proud of him for that at-bat. That's a baseball player's at-bat, a very smart at-bat. You've got to be able to download all the info and capitalize, which he did."

Carlos Asuaje and Jabari Blash hit two-run homers for the Padres.

Stanton's first swing of the night sent a pitch to the left-field concourse, traveling an estimated 462 feet to give Miami a 2-0 lead in the first inning. Dee Gordon rounded the bases ahead of Stanton, shaking his head with a grin of amazement at his teammate's shot.

The Marlins slugger barely cleared the wall -- and the glove of a leaping Blash in right field -- in the third inning for his 16th home run in August. He has 23 homers since the All-Star break.

"It has been incredible," manager Don Mattingly said. "He has fueled this run. Since the break he has been a terror."

Stanton also made a diving catch in right field in the second to rob Blash of a hit.

The Padres held Stanton to a two-out, two-run double in the fourth, which put Miami ahead 5-2. All three of his hits came off Travis Wood.

"I missed a couple of pitches, especially to Stanton," Wood said. "If you miss, he's not going to miss it."

Blash's fourth home run of the year off Dustin McGowan (8-1) capped a four-run sixth for the Padres to put them ahead 6-5.

Brad Ziegler pitched a perfect ninth for his ninth save of the season, all this month.

LOTS OF CLOUT

The Marlins have outscored opponents 41-30 in their past five wins.

"We're swinging the bats good right now," Mattingly said. "I don't think you can do this over a long period. I'd like to have some different style of games."

NICKNAME GAME

With players around the majors wearing nicknames on the back of their jerseys this weekend, Stanton chose "Cruz," which is what his mother calls him. Giancarlo Cruz-Michael Stanton is his full name.

TRAINER'S ROOM

Marlins: LHP Wei-Yin Chen (tired arm) began a rehab assignment in the Gulf Coast League and threw 12 pitches. The Marlins hope Chen, 1B Justin Bour (right oblique) and 3B Martin Prado (right knee) will return sometime in September, Mattingly said.

UP NEXT

Stanton tries for homer No. 50 on Saturday against RHP Dinelson Lamet (7-5, 4.84). RHP Odrisamer Despaigne (0-1, 4.42) makes his second start of the year for Miami.