DETROIT — Detroit rookie first baseman Niko Goodrum dropped Jon Jay’s grounder and then made a wild throw, allowing the tie-breaking run to score in the ninth inning as the Kansas City Royals snapped a nine-game losing streak, rallying past the Tigers 3-2 Friday night in the second game of a split doubleheader.

Detroit won the afternoon opener 3-2 on a 10th-inning solo homer by JaCoby Jones.

The Tigers led 2-1 in the ninth of the nightcap before pinch-hitter Abraham Almonte lined a tying single with one out. With runners at first and second, Jay hit a grounder to Goodrum, who didn’t handle it cleanly. Goodrum then compounded his problems by flipping the ball over the head of pitcher Shane Greene (1-1), who was covering the bag.

Kelvin Herrera pitched the ninth for his third save, ended Detroit’s four-game winning streak.

ORIOLES 3, INDIANS 1: Dylan Bundy pitched six innings of five-hit ball and struck out nine to secure his elusive first win of the season, and host Baltimore ended a six-game losing streak.

Manny Machado homered and Trey Mancini doubled in two runs for the Orioles, who were outscored 43-22 during an 0-6 trip through Boston and Detroit.

BLUE JAYS 8, YANKEES 5: Teoscar Hernandez and Yangervis Solarte each homered and Lourdes Gurriel Jr. drove in three runs in his major league debut as Toronto won at New York.

The Blue Jays have won 5 of 6.

NATIONAL LEAGUE

PHILLIES 2, PIRATES 1: Odubel Herrera hit a go-ahead triple in the eighth inning to lift host Philadelphia.

Herrera, Cesar Hernandez, Carlos Santana and Maikel Franco each had two hits for the Phillies, who have won 9 of 11, improving to 7-1 at home. It is Philadelphia’s best start at home since it won 7 of 8 to begin the 1981 season.

Luis Garcia (2-1) pitched a scoreless eighth inning, and Hector Neris blanked Pittsburgh in the ninth to earn his third save in four tries.

After Hernandez led off the eighth with a double and Santana grounded out, Herrera lined an 86-mph cutter from George Kontos (1-2) on a 1-2 count just inside the first-base bag to score Hernandez and give the Phillies a 2-1 lead.

The Pirates threatened in the ninth when Jordy Mercer doubled with one out, but David Freese popped out in the infield and Adam Frazier grounded out.

NOTES

INDIANS: Mike Napoli will have season-ending knee surgery after getting hurt in the minors.

Napoli tore his right anterior cruciate ligament this week while playing for Triple-A Columbus. He will have the operation once the swelling goes down, and the Indians say that could take two weeks.

RAYS: Center fielder Kevin Kiermaier had surgery to repair a torn ligament in his right thumb that will sideline him 2 to 3 months.

MARINERS: The Seattle Mariners activated catcher Mike Zunino from the 10-day disabled list after missing the first three weeks of the season because of a strained abdominal muscle. Mike Marjama was optioned to Triple-A Tacoma to clear the roster spot.

GIANTS: The San Francisco Giants placed outfielder Hunter Pence on the 10-day disabled list with a sprained right thumb and recalled outfielder Mac Williamson from Triple-A Sacramento.