With the 2017 postseason field finalized Saturday, there was only race of importance on Sunday, the final day of the regular season. That was the race for the No. 1 pick in the 2018 draft.

The Giants went into Sunday's season finale with baseball's worst record at 63-98, and the Tigers were right behind them at 64-97. Here are the various No. 1 pick clinching scenarios:

Giants clinch No. 1 pick with a loss or a Tigers win.

a Tigers win. Tigers clinch No. 1 pick with a loss and a Giants win.



What happened Sunday? The Giants won, thanks to Pablo Sandoval's walk-off home run against the Padres in Game 162 (SF 5, SD 4). Check it out:

That's all Folks! Pablo walks off the season! Until next year!!! pic.twitter.com/FUl3zixL3N — SF Giants on NBCS (@NBCSGiants) October 1, 2017

The walk-off dinger raised Sandoval's batting line to .220/.265/.367 overall and .225/.263/.375 with the Giants. Ouch.

Kung Fu Panda's walk-off homer opened the door for the Tigers to steal the No. 1 pick away, and they did exactly that against the Twins (MIN 5, DET 1). Anibal Sanchez came through with a five-inning, three-run-outing to take the loss.

So, thanks to Sandoval's walk-off homer and Detroit's loss, the Tigers now hold the No. 1 pick in the 2018 draft, not the Giants. All San Francisco had to do was lose to clinch that top pick! But nope, Sandoval walked it off.

The Tigers, by the way, went 6-24 in September and 13-41 in their final 54 games of the season.