Jarrod Dyson delivered an infield single with the bases loaded and two outs in the eighth inning Saturday, giving the Kansas City Royals a scrappy 4-3 victory over the Oakland Athletics.

The Royals had rallied to tie the game on a sacrifice fly by Eric Hosmer in the seventh, and then loaded the bases on an error and a pair of walks by reliever Ryan Cook.

Dyson, hardly known for his power, showed bunt on his first pitch from Cook (1-2) before hitting a grounder deep behind second base. Shortstop Adam Rosales fielded it cleanly but didn't even bother with a throw as pinch runner Alcides Escobar scored the go-ahead run.

Aaron Crow (6-3) worked the eighth and Greg Holland handled the ninth for his 20th save, wrapping up Kansas City's first win in five tries against Oakland this season.

Mike Moustakas homered and Billy Butler drove in a run for the Royals, while Alex Gordon walked three times and reached on an error in his return to the lineup. He'd missed the last two games after a scary collision with the outfield wall Wednesday night against Cleveland.

Josh Donaldson homered and drove in two runs to lead the A's.

Oakland struck right away when it put two aboard in the first and Josh Reddick sent a single to center. The throw from Dyson was well up the third-base line, allowing Donaldson to score.

Royals starter Ervin Santana recovered to strand runners on second and third.

The Royals tried to get the run back in the bottom half when Miguel Tejada singled and reached second on a groundout. Moments later, Elliot Johnson hit a grounder toward third with two outs and appeared to be safe when the throw pulled first baseman Brandon Moss off the bag.

Umpire Marty Foster ruled him out, though, and never wavered from his decision despite some rather animated objections from Royals manager Ned Yost and first base coach Rusty Kuntz.

A bright sun and flat sky started to cause problems after that.

The A's had two aboard with one out in the third when Donaldson hit a high popup down the right-field line. Johnson chased it from second and outfielder David Lough sprinted in from right while Hosmer tried to camp under it from first base - all to no avail.

The ball fell in fair territory, allowing John Jaso to score for a 2-0 lead.

In the bottom half of the inning, Dyson led off with a weak pop foul behind the plate, but Jaso couldn't locate the ball in the sun after discarding his mask. The A's catcher comically had to cover his head with his glove while the ball plopped onto the field next to him.

Dyson followed with a single to right, and after a stolen base and errant pickoff throw, he scampered home from third on Butler's groundout to get the Royals within 2-1.

Moustakas added his two-out homer in the fourth to tie the game, and Donaldson's solo shot leading off the sixth restored Oakland's one-run cushion. The Royals knotted the game again when they loaded the bases with one out in the seventh and Hosmer hit a sacrifice fly to center.