It looked like Maryland softball’s season was going to come to a close when it trailed San Jose State by one in the sixth inning. Down to just six outs, the Terps rallied and plated four runs in the frame to keep their season alive.

Maryland capitalized on poor Spartan defense and pitching to take the lead with two base hits, then added the inning’s fourth run when Sydney Lewis was hit by pitch. Roaring back, the Terps rode their newfound advantage to two more shutout innings.

Coming off a disappointing loss to BYU, No. 1 seed Maryland (38-18) returned to action against No. 9 seed San Jose State (27-29) and split the day’s action with a 7-4 victory to advance to the National Invitational Softball Championship semifinal.

With its season on the line, Maryland’s offense delivered after a poor showing in the first game of the day.

[Top-seeded Maryland softball mercy rules Cal State Northridge in NISC first round, 8-0]

Multiple walks let the Terps fill up the bases in the sixth, and they took advantage. Jaeda McFarland singled and Megan Mikami did the same. Suddenly, Maryland scored four runs to retake the lead.

Coupled with a three run fourth inning, the run support was enough to give Courtney Wyche, who allowed four runs, a win in a game that became a must-win after opening Friday with a loss.

Maryland dominated BYU in its second game of the season, defeating the Cougars 10-2 in a February matchup. In sunny Puerto Vallarta, Mexico, the eight-run win looked like the start of a potential special season for the Terps.

Three months later, No. 8 seed BYU (34-16) returned the favor, handing Maryland its first loss of the tournament.

Trinity Schlotterbeck started in the circle for the Terps, just like she did in the first matchup. Similar success eluded her Friday.

Schlotterbeck gave up five runs in the opening frame. Cougar hitters were all over the senior, crushing four extra-base hits in the inning. Two of those cleared the outfield fence, including a three-run shot with two outs.

[Maryland softball bows out of Big Ten tournament with 7-1 loss to Iowa]

BYU worked long counts as Schlotterbeck leaned heavily on her patented changeup. The opposing lineup began to sit on it. Each time she tried to fool a hitter with a breaking ball or offspeed offering, hitters stayed back and fouled pitches off to lengthen the at bat and wait for a pitch that lacked movement.

Most hitters stayed patient against Schlotterbeck, but BYU freshman Maddie Udall tagged a Schlotterbeck fastball — the first pitch of the at bat — for a three-run homer to cap the Cougars’ five-run first inning.

Even in the early season victory over BYU, Schlotterbeck surrendered five hits and two runs. But she limited the damage and had an offensive explosion to back her.

That didn’t happen Friday.

Mackense Greico accounted for all four of Maryland’s runs in a 2-for-3 effort. That was all the offense Maryland mustered as it never overcame BYU’s early advantage. Paired with the blowup first inning, the Terps lost their first game of postseason play. But the NISC is double elimination, meaning Maryland still had one game of life left.