By KYLE HIGHTOWER AP Sports Writer

BOSTON (AP) — Giancarlo Stanton hit a go-ahead grand slam over the Green Monster in the eighth inning and the New York Yankees beat Boston 5-3 on Saturday to tie the Red Sox for the top spot in the AL wild-card race.

The Yankees, who began the day with a two-game lead over Toronto and Seattle for the second wild card, now have a chance to nudge in front of their longtime rivals in Sunday night’s series finale at Fenway Park.

READ MORE: Record Fall Warmth: An Unprecedented Autumn In New England

Stanton connected off reliever Darwinzon Hernandez with two outs to give the Yankees a 5-2 lead. The slugger also had three hits and a three-run homer Friday night to help New York win the opening game of the series.

Luis Severino (1-0) pitched two scoreless innings for the win. Aroldis Chapman allowed Bobby Dalbec’s solo homer in the ninth and hit Kevin Plawecki with a pitch but held on for his 29th save.

New York starter Nestor Cortes’ day ended after 4 1/3 innings. The left-hander gave up two runs on four hits and struck out four. He hasn’t won since Aug. 28, a span of six starts.

Tanner Houck (1-5) took the loss, allowing two runs over 1 2/3 innings.

Plawecki had a home run for Boston. Kyle Schwarber scored on a wild pitch and starter Nick Pivetta allowed one run over 5 1/3 innings.

The Red Sox took an early 2-0 lead before Pivetta was pulled in the sixth after he gave up a single to Gio Urshela and a double to Brett Gardner. Hansel Robles entered and threw his first pitch to Aaron Judge to the backstop, allowing Urshela to score.

Gardner tried to score on Judge’s chopper to third base, but was easily thrown out at the plate by Rafael Devers. Anthony Rizzo then lined out to end the inning.

The score was still 2-1 when Boston manager Alex Cora inserted Houck, who walked Stanton and Joey Gallo on eight pitches before settling down and getting Gleyber Torres to ground into a double play.

Houck quickly got Gary Sanchez down 0-2 and struck him out swinging to end the seventh.

Houck had a chance to set down the Yankees in order in the eighth but he issued two-out walks to Gardner and Judge.

Cora turned to Hernandez, who plunked Anthony Rizzo on the arm with a 3-1 pitch to load the bases.

READ MORE: As Pediatricians Get Ready To Give COVID Vaccine To Children, Some Doctors Say Review The Data

Stanton cleared them, drilling Hernandez’s 94 mph fastball over the Green Monster in left field.

That spoiled a strong outing by Pivetta. He allowed three hits, issued no walks and struck out seven.

The right-hander gave up four runs in just 1 2/3 innings against the Yankees on Aug. 18.

Cora said before the game that Pivetta’s success would hinge on his ability to control his fastball.

He did, striking out the side in the second after giving up a single to Stanton to open the inning.

Plawecki then put the Red Sox in front 1-0 in the third, crushing Cortes’ slider and clanging it off the light tower above the Green Monster.

TRAINER’S ROOM

Yankees: INF DJ LeMahieu sat out with what manager Aaron Boone said is a lingering hip/groin issue. He hopes LeMahieu can return Sunday. … RHP Jonathan Loáisiga (shoulder strain) is slated to throw a bullpen Sunday and if all goes well could return for the next series against the Blue Jays.

CLOSE CALL

Rougned Odor jumped all over Pivetta’s fastball in the third inning, driving a sharp flyball to right field that took Hunter Renfroe all the way to the warning track before he was able to haul it in just in front of the short bullpen wall.

UP NEXT

Yankees LHP Jordan Montgomery (6-6, 3.55 ERA) gets the ball Sunday night. He has allowed no more than one run in eight of his last 10 starts, going 3-1 with a 2.31 ERA. He’ll be opposed by left-hander Eduardo Rodriguez (11-8, 4.97), who is 4-2 with a 3.64 ERA in nine starts since Aug. 1.

MORE NEWS: 'We Thought It Was Going To Explode' Fans On Way To ALCS At Fenway Talk About Houston Plane Crash

(© Copyright 2021 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)