After a back-and-forth battle that went to eight innings, Michigan State had a chance at a walk-off win Saturday to even the series after falling just short in Friday’s matchup.

Maryland managed to send the game to extra innings despite the Spartans loading the bases in the bottom of the seventh. But with bases juiced in the eighth, Michigan State finally found a way to break through.

Pitcher Sami Main, who took over for pitcher Victoria Galvan after three innings, walked center fielder Ebonee Echols and third baseman Kaitlyn Eveland, and then hit designated player Joanna Bartz two pitches later to load the bases.

The Spartans walked off on right fielder Kelly Zackrison’s flyout to send Echols home, securing an 8-7 win in eight innings to avenge their near comeback in Friday’s matchup. Michigan State’s win sets up a rubber match Sunday.

For the second straight game, Maryland started the game with an offensive burst, scoring four runs in the first frame Saturday, just as they had the night before.

The Terps’ early lead did not last long, though, as the Spartans clawed their way back to make it another close game. Center fielder JoJo McRae opened the contest with an infield single before stealing second, putting pressure on Michigan State right away. After an error advanced McRae to third, a double from catcher Gracie Voulgaris scored her.

Shortstop Bailey Boyd and Sammie Stefan hit back-to-back RBI singles to extend the Terps’ lead to 4-0. While it took the Spartans four innings to get their first hit Friday, their deficit was whittled away much quicker in game two.

Galvan allowed a walk and a single to lead off the inning, and a sacrifice fly from first baseman Mackenzie Meech pushed Michigan State’s first run across. And a triple from shortstop Caitie Ladd five pitches later halved the deficit.

Ladd then scored the Spartans’ third run of the inning on a wild pitch from Galvan, but the Terps still held a 4-3 lead.

In the top of the third, first baseman Taylor Wilson hit what looked to be a routine groundout for second baseman Melanie Baccay, but she misplayed the ball and overshot third base with a throw when she tried to nab Stefan. Third baseman Kaitlyn Eveland’s throw home also sailed off the mark, allowing Stefan to score, giving Maryland a 5-3 lead.

But the Spartans struck right back to take a lead, with back-to-back home runs from Ladd and Eveland putting them up 6-5.

The game evened at six in the top of the fourth as right fielder Amanda Brashear doubled home McRae, who finished 4-for-5 with two runs scored.

The Terps opted to put Main in the circle to close out the last half of the game, relieving Galvan, who went three innings, allowing six runs on five hits. Main was effective in keeping the Spartans off the board through the fourth and fifth innings, despite a bases-loaded situation in the bottom of the fifth, but couldn’t hold off the Spartan comeback in the sixth to tie the game at seven in the sixth.

Michigan State wasted no time in getting runners on base in the seventh, either. Bartz singled up the middle, and immediately advanced to second on Zackrison’s bunt.

Another bunt from right fielder Katie Quinlan loaded the bases for the Spartans, but the Terps’ defense got itself out of another bases-loaded jam with two consecutive outs at home plate and a fly out to send the game to extra innings.

The Spartans were finally able to break through with bases loaded in the eighth inning to capture the second game of the series, 8-7.

CORRECTION: Due to a reporting error, a previous version of this story misspelled Ebonee Echols’ name. This story has been updated.