Updated

The Braves scored four runs in the ninth inning Friday afternoon to top the Cubs 9-5, but a win later by the Nationals over the Marlins kept Atlanta from wrapping up its first division title in eight years.

A Marlins win in that game would have clinched the Braves their first NL East crown since 2005, when they won the last of their record-setting 14 straight division titles.

Instead, the Nationals shut out the Marlins 8-0.

But the Braves clinched at least a share of the division title and their magic number now sits at one.

Brian McCann and Chris Johnson hit RBI singles and Andrelton Simmons added a two-run double during Atlanta's ninth-inning rally, all off Kevin Gregg (2-5).

Earlier, Freddie Freeman hit a three-run homer and Johnson a solo shot as the Braves built an early 4-0 lead.

The Cubs got solo homers from Starlin Castro, Donnie Murphy and Dioner Navarro but used eight pitchers in the opener of the three-game series.

The Braves used six pitchers, with David Carpenter (4-1) throwing a perfect eighth inning for the win.

Chicago right-hander Scott Baker had his first poor outing in three starts since coming off the disabled list following Tommy John surgery last year.

Baker gave up just one run in 11 innings coming in, but allowed five runs in four frames against Atlanta. He gave up four hits and three walks and struck out one.

Paul Maholm went 5 1/3 innings for Atlanta and was charged with four runs on eight hits. The lefty struck out two and had an RBI double. Maholm pitched for the first time in 12 days after the Braves skipped his last start because of an elbow injury.

"I made a couple bad pitches for the home runs and it just seemed like later in the game the pitches weren't the same," said Maholm. "I thought early on I had a lot better stuff than I had the last few times."

The Cubs came back from deficits of 4-0 and 5-1 to tie the game in the seventh inning.

"It was nice to see us battle back after being down like we were," said Cubs manager Dale Sveum. "We hit some home runs and the bullpen did a nice job until the end there."

Braves outfielder Jason Heyward was activated off the disabled list and wore a protective piece on his batting helmet to cover his surgically-repaired jaw.

Heyward's jaw was fractured last month after he was hit in the side of the face by a pitch from Mets ace Jon Niese. He played five innings and went 0- for-2 with a walk and a run scored.

Johnson hit his 11th homer of the season in the second inning and Freeman's three-run blast in the third, his 22nd, built a 4-0 lead for the Braves.

After the Cubs got a run back in the bottom of the third on Anthony Rizzo's single, Maholm hit an RBI double in the fourth to make it 5-1 Braves.

The Cubs chipped away. Castro and Murphy hit leadoff homers in the fifth and sixth innings and Luis Valbuena added an RBI single off Scott Downs later in the sixth to get Chicago within 5-4.

Navarro homered off Luis Avilan in the seventh to tie the game at 5-5.

Game Notes

The Braves, who just lost two of three to the Nationals, are 6-9 in their last 15 games ... The Cubs snapped a five-game losing streak Thursday in Milwaukee and finished 4-7 on an 11-game road trip ... Chicago outhit Atlanta 11-8.