KANSAS CITY, Mo. (TNS) — Hours before the Royals began their final series with a group of players on the verge of free agency on Friday, the organization's minor league players of the year lined up along the first-base line to watch major league batting practice and greet the likes of Eric Hosmer and Mike Moustakas.

They shook hands with bench coaches and took pictures with Lorenzo Cain and Alcides Escobar. They stood in a mostly empty Kauffman Stadium, surveying a field that in the future might be theirs to inherit.

Once they were honored in a pregame ceremony, the potential stars of tomorrow took their seats to watch men, who years ago became Kansas City legends, play in what could be their final games here in a Royals uniform.

They saw a pitching duel in which Whit Merrifield's homer — a leadoff, 410-foot shot that hugged the left-field foul pole on its way out with an exit velocity of merely 103.4 mph in the third inning — was the most thrilling hit of the evening.

And they saw the Royals, a team that has scored three or fewer runs in five of its last six games, beat the National League wild card-leading Arizona Diamondbacks 2-1.

The Royals improved to 79-81 and retained the opportunity to finish with a .500 record for the second year in a row.

To get there, starter Ian Kennedy provided five innings of one-run ball against one of his former teams. He labored throughout his 30th start of the season, needing 23 pitches to get through the first inning alone. He allowed a leadoff homer to Jake Lamb in the second inning, the 34th home run Kennedy had allowed this season.

But Kennedy wound up punching out seven batters and finished with 86 pitches. It was enough for Kennedy to earn just his fifth win of his topsy-turvy 2017 campaign, and his first victory this season at home. He hadn't won in two months, since a quality start on July 26. He'd lost seven of his previous 10 starts and did not factor into the other three decisions.

A sluggish Royals offense, which tallied nine hits and stranded eight runners, nearly cost Kennedy the win.

The top of the order squandered former Royals starter Zack Greinke's parting gift — two straight walks to lead off the fifth inning — when reliever David Hernandez needed only 11 pitches to retire the next three batters.

Those gathered at Kauffman Stadium watched Moustakas spray the ball around the field for a single in each of his first three at-bats, sending the crowd of 23,488 into Mooooose cheers on every occasion. They saw Hosmer provide a first-inning RBI on a ball that chopped in front of the plate, bounced onto the dirt between the Diamondbacks shortstop and rolled into short left-center field to give the Royals their first lead of the game.

And they saw Royals reliever Mike Minor record his fifth save.