Updated

SURPRISE, Ariz. -- Robbie Ray improved upon a shaky first outing by pitching three scoreless innings in the Diamondbacks' 4-1 victory over the Kansas City Royals on Monday at Surprise Stadium.

Ray had to be pulled early in the second inning of his first spring start because of a high pitch count. On Monday, he needed just 39 pitches to get through three innings. He gave up three hits, struck out one and didn't walk a batter.

"I felt like today I was able to mix in and out a lot better than my first outing," Ray told mlb.com. "That was good."

The Diamondbacks scored twice in the fourth inning and two more in the sixth. Chris Owings, David Peralta and Jeff Mathis had two hits apiece, and Peralta contributed two RBI.

The D-backs also got solid outings from the bullpen. Randall Delgado struck out the side in the fourth, and left-handers Andrew Chafin and Jorge De La Rosa each worked a 1-2-3 inning in the fifth and sixth.

Kansas City's lone run was scored in the eighth off of Matt Koch, who was making his first spring appearance.