Now that’s how you win a ballgame.

The Boston Red Sox entered the ninth inning of Thursday night’s game against the New York Yankees trailing by three runs. They went home with a 7-5 win, thanks to Hanley Ramirez’s monstrous walk-off home run with two outs in the bottom of the ninth.

The win pushed the Yankees back five games in the AL East standings, which the Red Sox lead by two games, and spoiled a stellar start from New York starter Masahiro Tanaka, who went seven innings and allowed only one run on four hits.

Thumbnail photo via David Butler II/USA TODAY Sports Images