Maryland softball was on the verge of falling in a shocking upset. The Terps entered the bottom of the seventh inning down 3-2 against Fairfield.

Even worse, Maryland was sending its No. 8 and No. 9 hitters to the plate against the Stags.

In stepped infielder and No. 8 hitter Taylor Liguori. The senior has only had a .250 batting average and one extra-base hit on the year, but drew a walk to start a potential rally.

Next came Sammi Woods, another middle infielder and the last hitter in coach Mark Montgomery’s lineup. She came through, smacking a ball the opposite way to advance the pinch runner over to third.

Kiley Goff delivered the walk-off double two batters later. The win started a 4-0 weekend for the Terps and continued a win streak that’s now up to 10 — and was spurred on by the bottom of Montgomery’s lineup.

“We do a very good job with communicating throughout the entire lineup,” Goff said.

[Kiley Goff walk-off powers No. 23 Maryland softball to 4-3 win over Fairfield]

Jaeda McFarland and Amelia Lech are mainstays of Maryland’s offense, but veterans such as Liguori and Trinity Schlotterbeck — the No. 6 hitter in the first Fairfield win — give Montgomery’s lineup depth and balance.

Liguori went 5 for 11 with three walks over the weekend while Schlotterbeck collected three RBIs.

“I think that the bottom of the lineup has a lot of upperclassmen,” Schlotterbeck said. “We’re all going up there with that same calm mentality … we know how to hit, we know how to get runners in.”

Junior Michaela Jones has also picked up where she left off last season. The mainstay at third base is fourth on the team in batting average at .283 and second in doubles with six.

“The returners are better, they’ve learned, they’ve been through challenges,” Montgomery said earlier this season.

[How a six-inch target and a backstop have helped Courtney Wyche diversify her pitching]

Despite all the veterans on the team, the emergence of Woods, a freshman, has helped the Terps’ offense.

The California native was the Defensive and Offensive Player of the Year at Mission Viejo High School, and her game has translated to the college level — she has stepped in and started every game at shortstop.

The freshman consistently helps turn over the lineup as the last hitter. Woods is hitting .271 and had some of her best performances this weekend, going four for 12 over the four outings.

“You’re seeing a great mesh of young talent with veteran leadership that’s learning how to make this program … be what it’s capable of being,” Montgomery said.

The heart of Maryland’s lineup has power, with McFarland looking to solidify herself as a Big Ten Player of the Year candidate and Lech smashing a team-high eight home runs.

But Montgomery has long stressed the importance of having a balanced lineup that doesn’t allow pitchers to take at-bats lightly. The morning Fairfield win vindicated that belief and showed the importance of having threats such as Jones, Schlotterbeck, Liguori and Woods — the usual bottom of the lineup — that can do damage from any spot on the scorecard.