Scott Kingery tripled to lead off the 15th inning and scored on a single by Rhys Hoskins as the Philadelphia Phillies outlasted the Detroit Tigers 3-2 in a game that finished early Wednesday morning.

Kingery, who had struck out four times, hit a drive to deep right off Daniel Stumpf (1-1) to start the winning rally. Hoskins followed with a clean single to right.

Detroit nearly won it in the 14th against Jose Alvarez (1-2), but left fielder Brad Miller threw Nicholas Castellanos out at the plate when he was trying to score on Brandon Dixon's one-out single.

Detroit Tigers pitcher Matthew Boyd throws against the Philadelphia Phillies in the first inning of a baseball game in Detroit, Tuesday, July 23, 2019. (AP PhotoPaul Sancya)

Detroit Tigers pitcher Matthew Boyd throws against the Philadelphia Phillies in the first inning of a baseball game in Detroit, Tuesday, July 23, 2019. (AP PhotoPaul Sancya)

Roman Quinn homered for Philadelphia, which is a half-game behind St. Louis for the National League's last playoff spot.

The game started after a 38-minute rain delay, and both teams had trouble with grounders early on. Kingery, Philadelphia's shortstop, made an error that led to an unearned run in the first. The Tigers made two errors in the sixth, but starter Matthew Boyd escaped that jam.

Quinn's two-run homer gave the Phillies the lead in the second. Castellanos tied it with an RBI double in the sixth.

Aaron Nola allowed one earned run in seven innings, and Boyd allowed two in six. Then the bullpens took over and kept both offenses off the scoreboard for a while.

Nick Pivetta pitched 3 2/3 scoreless innings for the Phillies. Nick Ramirez pitched three for Detroit.

TRAINER'S ROOM

Tigers: IF Josh Harrison (left hamstring) has started a running program again. Manager Ron Gardenhire said Harrison had to "back off" because he felt stiffness in his leg.

UP NEXT

Phillies: Vince Velasquez (2-5) takes the mound for Philadelphia on Wednesday in the finale of this two-game series. He lost to the Tigers on April 30.

Tigers: Jordan Zimmermann (0-7) starts for Detroit.

Follow Noah Trister at www.Twitter.com/noahtrister

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports