KANSAS CITY, Mo. — The Royals lost a lead in the eighth inning, but outfielder Jorge Soler took it back with one swing of his bat in the bottom of the frame as the Royals beat the Athletics 5-4 on Saturday afternoon at Kauffman Stadium.

Royals pitcher Jason Hammel did not factor into the decision, as reliever Tim Hill gave up a run in the eighth inning that allowed the A’s to tie the game 4-4.

But Soler, who smashed a curveball, thrown just outside the zone, 393 feet to the Sonic seats in left field, redeemed Hill’s outing.

Hill became the victor, with Kelvin Herrera throwing a perfect ninth inning to secure his 13th save of the season and the Royals’ sixth win in 10 games.

Hammel’s start was ended by A’s catcher Bruce Maxwell, who led off the seventh with a homer on Hammel’s 105th pitch of the game. The blast cut the Royals’ lead to 4-3 and sent Royals manager Ned Yost to the bullpen. Kevin McCarthy retired three of four batters before turning the ball over to Hill for the eighth.

Not even 24 hours after being crushed in a series-opening 16-0 loss, the Royals scored twice in each of the first two innings off A’s starter and former Royals pitcher Trevor Cahill. Jon Jay led off the bottom of the first inning with a single to right field and scored ahead of Whit Merrifield on Salvador Perez’s two-run double.

But in the second inning, the Royals were a little more inventive. With two outs and no one on base, Ryan Goins laid down a bunt that scuttled towards the mound as he tried to beat the throw from catcher Maxwell. The first-base umpire called Goins out, but the Royals won their challenge of the ruling.

Alcides Escobar and Jon Jay hit back-to-back RBI extra-base hits to increase the Royals’ lead to 4-0.

Roster moves: The Royals claimed outfielder Rosell Herrera, a 25-year-old switch-hitter who four years ago was one of Baseball America’s top 100 prospects, off waivers from the Cincinnati Reds. He was optioned to Class AAA Omaha.

The Royals transferred pitcher Nathan Karns to the 60-day disabled list to make room for Herrera on the 40-man roster. Karns has battled right elbow inflammation all season and hasn’t pitched in a game since his final spring-training outing on March 22.

Herrera, meanwhile, made his major-league debut with the Reds in late April. He batted .154 (2 for 13) with five strikeouts in 11 games before being designated for assignment on Friday.

According to Baseball America, he signed with the Rockies for $550,000 out of the Dominican Republic in 2009. After hitting .343 with 16 home runs, 33 triples and 76 RBIs in 126 games in the low Class A South Atlantic League, he spent the next two seasons with the Rockies’ Class A-Advanced affiliate in the California League. He reached Class AAA last year, hit .278 with 27 RBIs and was granted free agency at the end of the season.

Herrera is a career .276/.346/.387 hitter in the minor leagues. A threat on the base paths, he’s swiped 132 bags in 188 attempts (70 percent).

Up next: The Royals, who improved to 21-37, send Jakob Junis to the mound to close out this six-game home stand this afternoon.

The Royals have not lost a series since the Yankees took two of three from them on May 18 to 20.