Sandy Alcantara became the first Marlins pitcher with two shutouts in his rookie season since Dontrelle Willis, and Miami beat the Kansas City Royals 9-0 Sunday.

Alcantara (5-12) threw a four-hitter with two walks and eight strikeouts for his first victory since the All-Star break. Willis had two shutouts while winning Rookie of the Year in 2003.

Starlin Castro hit his 18th home run and drove in two for the Marlins, who pounded out 13 hits to avoid a sweep after being held to two runs and 11 hits over the first two games.

Alcantara, pitching a day after his 24th birthday, was 0-4 with a 4.99 ERA in his previous 10 starts after being named to his first All-Star team. The right-hander also pitched a two-hitter against the Mets in May.

Kansas City starter Mike Montgomery (3-8) allowed five runs and eight hits in four innings. Montgomery was the last pitcher in the majors to throw two shutouts as a rookie, doing it in 2015 with Seattle.

Adalberto Mondesi and Hunter Dozier had the only hits for the Royals, who still won their third consecutive series of three or more games for the first time since July 2017.

Miami’s Lewis Brinson and Harold Ramirez each knocked in two runs, and Garrett Cooper had three hits.

Castro homered to left in the first inning, and the Marlins plated four runs in the fourth on five singles.

Four walks issued by Kyle Zimmer in the fifth helped the Marlins extend their lead to 7-0.