KANSAS CITY, Mo. (AP) — The Kansas City Royals had fought back to tie the game on a two-run homer by Eric Hosmer, and stingy left-hander Tim Collins had trotted in from the bullpen to keep the score right there. He threw the exact pitch he wanted to Atlanta's Jason Heyward — just not where he wanted to throw it. Heyward sent the pitch soaring over the fence in right field for a go-ahead homer in the seventh inning Tuesday night, and the Royals failed to score the tying run with the bases loaded and nobody out in the ninth inning of a 4-3 loss to the Braves. "Right pitch, bad location," Collins said. "That's the pitch I wanted to throw, but just not in that location." It had been 31 appearances since Collins (2-2) last allowed a home run. "It's going to happen," he said. "You tip your cap to him and remember next time not to make that mistake." Kris Medlen (5-7) limited the Royals to a run in the first and Hosmer's two-run homer in the fifth while striking out five. He turned the game over to Jordan Walden, who survived a leadoff walk in the eighth inning to get the game into the hands of Craig Kimbrel. The Braves closer walked Mike Moustakas and gave up a single to David Lough to start the ninth, but rallied to strike out Elliot Johnson and Jarrod Dyson. Kimbrel intentionally walked Alex Gordon to load the bases, and then got Alcides Escobar to fly out to right on the first pitch. The escape job was Kimbrel's 22nd save of the season. "We had them, that's for sure," Royals manager Ned Yost said. "Down a run, especially in the ninth inning — Moose with the walk, David Lough punched a single to right-center field to set us up for first and third and gave us a great opportunity. But our inability to put the ball in play for the next two outs definitely put us in a hole from that point." In a curious twist to interleague play, the Royals had played 142 games against NL teams at Kauffman Stadium without a visit by Atlanta. If not for last year's All-Star Game at the K, longtime Braves third baseman Chipper Jones would have retired having never played in the park. The opener of the two-game set was dominated by stingy pitching. The Royals scratched out their first run off Medlen in the first when Alex Gordon reached on a single, took second on an error and went to third on a sacrifice bunt. But he was caught in a rundown on a grounder by Hosmer, who reached second before Gordon was tagged out. Hosmer scored on Billy Butler's ensuing single. That was all the Royals would muster off Medlen until Escobar managed a two-out single in the fifth. The resurgent Hosmer followed with his tying two-run shot over the right-field wall, his fourth home run of the season but third in 10 games. "It was nice. Medlen was throwing a good game out there," Hosmer said, "and it was a big swing to get us back in the game." Ervin Santana had struck out five through the first three innings, but began running into trouble the second time through the Braves' power-packed lineup. But it wasn't home runs that gave them the lead, but a series of singles and doubles. Chris Johnson led off the fifth with a double, and Andrelton Simmons put runners on the corners with his base hit. Jordan Schafer tied the game 1-all on his double, and Heyward's double down the right-field line gave the Braves a 3-1 lead. Heyward didn't hit that ball particularly hard. The one he hit off Collins was crushed. Heyward greeted an 0-2 pitch from the Royals' diminutive left-hander with a ferocious swing and homered to give the Braves a 4-3 lead. "I was just looking for a pitch in the zone to hit," he said. "Looking for a pitch in the zone to hit right there and try not to miss it. Put a good swing on it." A good enough swing to give Kimbrel a chance to create some ninth-inning drama. "It's not the way you draw it up," Braves manager Fredi Gonzalez said of the living-on-the-edge save, "but we'll take it." Notes: The Braves began the day with 96 homers, tied with Colorado for first in the National League. They are 41-9 when they hit a homer and 4-23 when they don't. ... The Royals matched a season-high with three stolen bases. ... The Royals recalled LHP Will Smith and optioned RHP Kelvin Herrera to Triple-A Omaha. ... LHP Mike Minor pitches for the Braves on Wednesday night. RHP Luis Mendoza goes for the Royals.